/* Generated by Cython 3.2.4 */

#ifndef __PYX_HAVE_API__pyarrow___cuda
#define __PYX_HAVE_API__pyarrow___cuda
#ifdef __MINGW64__
#define MS_WIN64
#endif
#include "Python.h"
#include "_cuda.h"

static int (*__pyx_api_f_7pyarrow_5_cuda_pyarrow_is_buffer)(PyObject *) = 0;
#define pyarrow_is_buffer __pyx_api_f_7pyarrow_5_cuda_pyarrow_is_buffer
static int (*__pyx_api_f_7pyarrow_5_cuda_pyarrow_is_cudabuffer)(PyObject *) = 0;
#define pyarrow_is_cudabuffer __pyx_api_f_7pyarrow_5_cuda_pyarrow_is_cudabuffer
static PyObject *(*__pyx_api_f_7pyarrow_5_cuda_pyarrow_wrap_cudabuffer_base)(std::shared_ptr< arrow::cuda::CudaBuffer>  const &, PyObject *) = 0;
#define pyarrow_wrap_cudabuffer_base __pyx_api_f_7pyarrow_5_cuda_pyarrow_wrap_cudabuffer_base
static PyObject *(*__pyx_api_f_7pyarrow_5_cuda_pyarrow_wrap_cudabuffer)(std::shared_ptr< arrow::cuda::CudaBuffer>  const &) = 0;
#define pyarrow_wrap_cudabuffer __pyx_api_f_7pyarrow_5_cuda_pyarrow_wrap_cudabuffer
static std::shared_ptr< arrow::cuda::CudaBuffer>  (*__pyx_api_f_7pyarrow_5_cuda_pyarrow_unwrap_cudabuffer)(PyObject *) = 0;
#define pyarrow_unwrap_cudabuffer __pyx_api_f_7pyarrow_5_cuda_pyarrow_unwrap_cudabuffer
static int (*__pyx_api_f_7pyarrow_5_cuda_pyarrow_is_cudahostbuffer)(PyObject *) = 0;
#define pyarrow_is_cudahostbuffer __pyx_api_f_7pyarrow_5_cuda_pyarrow_is_cudahostbuffer
static PyObject *(*__pyx_api_f_7pyarrow_5_cuda_pyarrow_wrap_cudahostbuffer)(std::shared_ptr< arrow::cuda::CudaHostBuffer>  const &) = 0;
#define pyarrow_wrap_cudahostbuffer __pyx_api_f_7pyarrow_5_cuda_pyarrow_wrap_cudahostbuffer
static std::shared_ptr< arrow::cuda::CudaHostBuffer>  (*__pyx_api_f_7pyarrow_5_cuda_pyarrow_unwrap_cudahostbuffer)(PyObject *) = 0;
#define pyarrow_unwrap_cudahostbuffer __pyx_api_f_7pyarrow_5_cuda_pyarrow_unwrap_cudahostbuffer
static int (*__pyx_api_f_7pyarrow_5_cuda_pyarrow_is_cudacontext)(PyObject *) = 0;
#define pyarrow_is_cudacontext __pyx_api_f_7pyarrow_5_cuda_pyarrow_is_cudacontext
static PyObject *(*__pyx_api_f_7pyarrow_5_cuda_pyarrow_wrap_cudacontext)(std::shared_ptr< arrow::cuda::CudaContext>  const &) = 0;
#define pyarrow_wrap_cudacontext __pyx_api_f_7pyarrow_5_cuda_pyarrow_wrap_cudacontext
static std::shared_ptr< arrow::cuda::CudaContext>  (*__pyx_api_f_7pyarrow_5_cuda_pyarrow_unwrap_cudacontext)(PyObject *) = 0;
#define pyarrow_unwrap_cudacontext __pyx_api_f_7pyarrow_5_cuda_pyarrow_unwrap_cudacontext
static int (*__pyx_api_f_7pyarrow_5_cuda_pyarrow_is_cudaipcmemhandle)(PyObject *) = 0;
#define pyarrow_is_cudaipcmemhandle __pyx_api_f_7pyarrow_5_cuda_pyarrow_is_cudaipcmemhandle
static PyObject *(*__pyx_api_f_7pyarrow_5_cuda_pyarrow_wrap_cudaipcmemhandle)(std::shared_ptr< arrow::cuda::CudaIpcMemHandle>  &) = 0;
#define pyarrow_wrap_cudaipcmemhandle __pyx_api_f_7pyarrow_5_cuda_pyarrow_wrap_cudaipcmemhandle
static std::shared_ptr< arrow::cuda::CudaIpcMemHandle>  (*__pyx_api_f_7pyarrow_5_cuda_pyarrow_unwrap_cudaipcmemhandle)(PyObject *) = 0;
#define pyarrow_unwrap_cudaipcmemhandle __pyx_api_f_7pyarrow_5_cuda_pyarrow_unwrap_cudaipcmemhandle
static int __Pyx_ImportFunction_3_2_4(PyObject *module, const char *funcname, void (**f)(void), const char *sig);

#ifndef __PYX_HAVE_RT_ImportFromPxd_3_2_4
#define __PYX_HAVE_RT_ImportFromPxd_3_2_4
static int __Pyx_ImportFromPxd_3_2_4(PyObject *module, const char *name, void **p, const char *sig, const char *what) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    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, name, &cobj);
#else
    cobj = PyDict_GetItemString(d, name);
    Py_XINCREF(cobj);
#endif
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C %.8s %.200s",
                PyModule_GetName(module), what, name);
        goto bad;
    }
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C %.8s %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             what, PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    *p = PyCapsule_GetPointer(cobj, sig);
    if (!(*p))
        goto bad;
    Py_DECREF(d);
    Py_DECREF(cobj);
    return 0;
bad:
    Py_XDECREF(d);
    Py_XDECREF(cobj);
    return -1;
}
#endif

#ifndef __PYX_HAVE_RT_ImportFunction_3_2_4
#define __PYX_HAVE_RT_ImportFunction_3_2_4
static int __Pyx_ImportFunction_3_2_4(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    int result = __Pyx_ImportFromPxd_3_2_4(module, funcname, &tmp.p, sig, "function");
    if (result == 0) {
        *f = tmp.fp;
    }
    return result;
}
#endif


static int import_pyarrow___cuda(void) {
  PyObject *module = 0;
  module = PyImport_ImportModule("pyarrow._cuda");
  if (!module) goto bad;
  if (__Pyx_ImportFunction_3_2_4(module, "pyarrow_is_buffer", (void (**)(void))&__pyx_api_f_7pyarrow_5_cuda_pyarrow_is_buffer, "int (PyObject *)") < 0) goto bad;
  if (__Pyx_ImportFunction_3_2_4(module, "pyarrow_is_cudabuffer", (void (**)(void))&__pyx_api_f_7pyarrow_5_cuda_pyarrow_is_cudabuffer, "int (PyObject *)") < 0) goto bad;
  if (__Pyx_ImportFunction_3_2_4(module, "pyarrow_wrap_cudabuffer_base", (void (**)(void))&__pyx_api_f_7pyarrow_5_cuda_pyarrow_wrap_cudabuffer_base, "PyObject *(std::shared_ptr< arrow::cuda::CudaBuffer>  const &, PyObject *)") < 0) goto bad;
  if (__Pyx_ImportFunction_3_2_4(module, "pyarrow_wrap_cudabuffer", (void (**)(void))&__pyx_api_f_7pyarrow_5_cuda_pyarrow_wrap_cudabuffer, "PyObject *(std::shared_ptr< arrow::cuda::CudaBuffer>  const &)") < 0) goto bad;
  if (__Pyx_ImportFunction_3_2_4(module, "pyarrow_unwrap_cudabuffer", (void (**)(void))&__pyx_api_f_7pyarrow_5_cuda_pyarrow_unwrap_cudabuffer, "std::shared_ptr< arrow::cuda::CudaBuffer>  (PyObject *)") < 0) goto bad;
  if (__Pyx_ImportFunction_3_2_4(module, "pyarrow_is_cudahostbuffer", (void (**)(void))&__pyx_api_f_7pyarrow_5_cuda_pyarrow_is_cudahostbuffer, "int (PyObject *)") < 0) goto bad;
  if (__Pyx_ImportFunction_3_2_4(module, "pyarrow_wrap_cudahostbuffer", (void (**)(void))&__pyx_api_f_7pyarrow_5_cuda_pyarrow_wrap_cudahostbuffer, "PyObject *(std::shared_ptr< arrow::cuda::CudaHostBuffer>  const &)") < 0) goto bad;
  if (__Pyx_ImportFunction_3_2_4(module, "pyarrow_unwrap_cudahostbuffer", (void (**)(void))&__pyx_api_f_7pyarrow_5_cuda_pyarrow_unwrap_cudahostbuffer, "std::shared_ptr< arrow::cuda::CudaHostBuffer>  (PyObject *)") < 0) goto bad;
  if (__Pyx_ImportFunction_3_2_4(module, "pyarrow_is_cudacontext", (void (**)(void))&__pyx_api_f_7pyarrow_5_cuda_pyarrow_is_cudacontext, "int (PyObject *)") < 0) goto bad;
  if (__Pyx_ImportFunction_3_2_4(module, "pyarrow_wrap_cudacontext", (void (**)(void))&__pyx_api_f_7pyarrow_5_cuda_pyarrow_wrap_cudacontext, "PyObject *(std::shared_ptr< arrow::cuda::CudaContext>  const &)") < 0) goto bad;
  if (__Pyx_ImportFunction_3_2_4(module, "pyarrow_unwrap_cudacontext", (void (**)(void))&__pyx_api_f_7pyarrow_5_cuda_pyarrow_unwrap_cudacontext, "std::shared_ptr< arrow::cuda::CudaContext>  (PyObject *)") < 0) goto bad;
  if (__Pyx_ImportFunction_3_2_4(module, "pyarrow_is_cudaipcmemhandle", (void (**)(void))&__pyx_api_f_7pyarrow_5_cuda_pyarrow_is_cudaipcmemhandle, "int (PyObject *)") < 0) goto bad;
  if (__Pyx_ImportFunction_3_2_4(module, "pyarrow_wrap_cudaipcmemhandle", (void (**)(void))&__pyx_api_f_7pyarrow_5_cuda_pyarrow_wrap_cudaipcmemhandle, "PyObject *(std::shared_ptr< arrow::cuda::CudaIpcMemHandle>  &)") < 0) goto bad;
  if (__Pyx_ImportFunction_3_2_4(module, "pyarrow_unwrap_cudaipcmemhandle", (void (**)(void))&__pyx_api_f_7pyarrow_5_cuda_pyarrow_unwrap_cudaipcmemhandle, "std::shared_ptr< arrow::cuda::CudaIpcMemHandle>  (PyObject *)") < 0) goto bad;
  Py_DECREF(module); module = 0;
  return 0;
  bad:
  Py_XDECREF(module);
  return -1;
}

#endif /* !__PYX_HAVE_API__pyarrow___cuda */
