Lines Matching refs:view_src
587 Py_buffer view_dest, view_src; in PyObject_CopyData() local
601 if (PyObject_GetBuffer(src, &view_src, PyBUF_FULL_RO) != 0) { in PyObject_CopyData()
606 if (view_dest.len < view_src.len) { in PyObject_CopyData()
610 PyBuffer_Release(&view_src); in PyObject_CopyData()
615 PyBuffer_IsContiguous(&view_src, 'C')) || in PyObject_CopyData()
617 PyBuffer_IsContiguous(&view_src, 'F'))) { in PyObject_CopyData()
619 memcpy(view_dest.buf, view_src.buf, view_src.len); in PyObject_CopyData()
621 PyBuffer_Release(&view_src); in PyObject_CopyData()
628 indices = (Py_ssize_t *)PyMem_Malloc(sizeof(Py_ssize_t)*view_src.ndim); in PyObject_CopyData()
632 PyBuffer_Release(&view_src); in PyObject_CopyData()
635 for (k=0; k<view_src.ndim;k++) { in PyObject_CopyData()
639 for (k=0; k<view_src.ndim; k++) { in PyObject_CopyData()
641 elements *= view_src.shape[k]; in PyObject_CopyData()
644 _Py_add_one_to_index_C(view_src.ndim, indices, view_src.shape); in PyObject_CopyData()
646 sptr = PyBuffer_GetPointer(&view_src, indices); in PyObject_CopyData()
647 memcpy(dptr, sptr, view_src.itemsize); in PyObject_CopyData()
651 PyBuffer_Release(&view_src); in PyObject_CopyData()