Skip to content

Commit c25ed60

Browse files
committed
Pushed v0.4 docs at
1 parent 6f8e921 commit c25ed60

File tree

191 files changed

+44664
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+44664
-0
lines changed

v0.4/_downloads/CMakeLists.txt

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
cmake_minimum_required( VERSION 2.8 )
2+
3+
project( mypack )
4+
5+
# The files in the cmake directory must also be included in your project
6+
# until they are merged into upstream CMake.
7+
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}/cmake )
8+
9+
include( UseCython )
10+
11+
# With CMake, a clean separation can be made between the source tree and the
12+
# build tree. When all source is compiled, as with pure C/C++, the source is
13+
# no-longer needed in the build tree. However, with pure *.py source, the
14+
# source is processed directly. To handle this, we reproduce the availability
15+
# of the source files in the build tree.
16+
add_custom_target( ReplicatePythonSourceTree ALL ${CMAKE_COMMAND} -P
17+
${CMAKE_CURRENT_SOURCE_DIR}/cmake/ReplicatePythonSourceTree.cmake
18+
${CMAKE_CURRENT_BINARY_DIR}
19+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
20+
21+
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/src )
22+
23+
enable_testing()
24+
find_file( NOSETESTS_EXECUTABLE nosetests )
25+
add_test( nosetests "${NOSETESTS_EXECUTABLE}" -v --with-xunit )
26+
27+
add_subdirectory( mypack )

v0.4/_downloads/CMakeLists1.txt

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
if( NOT NUMPY_INCLUDE_DIR )
2+
find_package( PythonInterp )
3+
execute_process(
4+
COMMAND ${PYTHON_EXECUTABLE} -c "import numpy; print(numpy.get_include())"
5+
OUTPUT_VARIABLE _numpy_include
6+
OUTPUT_STRIP_TRAILING_WHITESPACE
7+
)
8+
find_path( NUMPY_INCLUDE_DIR numpy/arrayobject.h
9+
HINTS ${_numpy_include} )
10+
endif()
11+
include_directories( ${NUMPY_INCLUDE_DIR} )
12+
13+
set( cxx_pyx_files
14+
hoover_b.pyx
15+
hoover.pyx
16+
stlcontainers.pyx
17+
mypack_extra_types.pyx
18+
)
19+
set_source_files_properties( ${cxx_pyx_files}
20+
PROPERTIES CYTHON_IS_CXX TRUE )
21+
22+
cython_add_module( mypack_extra_types mypack_extra_types.pyx)
23+
cython_add_module( stlcontainers stlcontainers.pyx )
24+
cython_add_module( hoover hoover.pyx ../src/hoover.cpp )
25+
cython_add_module( hoover_b hoover_b.pyx ../src/hoover.cpp )

v0.4/_downloads/cpp_hoover.pxd

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
################################################
2+
# WARNING! #
3+
# This file has been auto-generated by xdress. #
4+
# Do not modify!!! #
5+
# #
6+
# #
7+
# Come on, guys. I mean it! #
8+
################################################
9+
10+
11+
from libcpp.map cimport map as cpp_map
12+
13+
cdef extern from "hoover.h" namespace "hoover":
14+
15+
cdef cppclass A:
16+
# constructors
17+
A() except +
18+
A(int) except +
19+
20+
# attributes
21+
cpp_map[int, double] y
22+
23+
# methods
24+
25+
pass
26+
27+
28+
29+
30+
{'cpppxd_footer': '', 'pyx_header': '', 'pxd_header': '', 'pxd_footer': '', 'cpppxd_header': '', 'pyx_footer': ''}

v0.4/_downloads/cpp_hoover_b.pxd

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
################################################
2+
# WARNING! #
3+
# This file has been auto-generated by xdress. #
4+
# Do not modify!!! #
5+
# #
6+
# #
7+
# Come on, guys. I mean it! #
8+
################################################
9+
10+
11+
from mypack cimport cpp_hoover
12+
from mypack cimport cpp_hoover_b
13+
14+
cdef extern from "hoover.h" namespace "hoover":
15+
16+
cdef cppclass B(cpp_hoover.A):
17+
# constructors
18+
B() except +
19+
20+
# attributes
21+
int z
22+
23+
# methods
24+
25+
pass
26+
27+
28+
29+
# function signatures
30+
cdef extern from "hoover.h" namespace "hoover":
31+
32+
void do_nothing_ab() except +
33+
void do_nothing_ab(cpp_hoover.A) except +
34+
void do_nothing_ab(cpp_hoover.A, B) except +
35+
36+
37+
38+
39+
{'cpppxd_footer': '', 'pyx_header': '', 'pxd_header': '', 'pxd_footer': '', 'cpppxd_header': '', 'pyx_footer': ''}

v0.4/_downloads/dtypes.pxd

+155
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
###################
2+
### WARNING!!! ###
3+
###################
4+
# This file has been autogenerated
5+
6+
# Cython imports
7+
from cython.operator cimport dereference as deref
8+
from cython.operator cimport preincrement as inc
9+
from libc cimport stdio
10+
from cpython.version cimport PY_MAJOR_VERSION
11+
from cpython.ref cimport PyTypeObject, Py_INCREF, Py_XDECREF
12+
from cpython.type cimport PyType_Ready
13+
from cpython.object cimport PyObject
14+
from cpython.object cimport Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, Py_GE
15+
16+
# Python imports
17+
cimport numpy as np
18+
19+
# Local imports
20+
cimport mypack_extra_types
21+
22+
# Cython imports for types
23+
from libcpp.string cimport string as std_string
24+
25+
cdef extern from "Python.h":
26+
ctypedef Py_ssize_t Py_ssize_t
27+
28+
cdef long Py_TPFLAGS_DEFAULT
29+
cdef long Py_TPFLAGS_BASETYPE
30+
cdef long Py_TPFLAGS_CHECKTYPES
31+
cdef long Py_TPFLAGS_HEAPTYPE
32+
33+
ctypedef struct PyGetSetDef:
34+
char * name
35+
36+
ctypedef struct PyTypeObject:
37+
char * tp_name
38+
int tp_basicsize
39+
int tp_itemsize
40+
object tp_alloc(PyTypeObject *, Py_ssize_t)
41+
void tp_dealloc(object)
42+
object tp_richcompare(object, object, int)
43+
object tp_new(PyTypeObject *, object, object)
44+
object tp_str(object)
45+
object tp_repr(object)
46+
long tp_hash(object)
47+
long tp_flags
48+
char * tp_doc
49+
PyMemberDef * tp_members
50+
PyGetSetDef * tp_getset
51+
PyTypeObject * tp_base
52+
void tp_free(void *)
53+
# This is a dirty hack by declaring to Cython both the Python 2 & 3 APIs
54+
int (*tp_compare)(object, object) # Python 2
55+
void * (*tp_reserved)(object, object) # Python 3
56+
57+
# structmember.h isn't included in Python.h for some reason
58+
cdef extern from "structmember.h":
59+
ctypedef struct PyMemberDef:
60+
char * name
61+
int type
62+
Py_ssize_t offset
63+
int flags
64+
char * doc
65+
66+
cdef extern from "numpy/arrayobject.h":
67+
68+
ctypedef object (*PyArray_GetItemFunc)(void *, void *)
69+
ctypedef int (*PyArray_SetItemFunc)(object, void *, void *)
70+
ctypedef void (*PyArray_CopySwapNFunc)(void *, np.npy_intp, void *, np.npy_intp, np.npy_intp, int, void *)
71+
ctypedef void (*PyArray_CopySwapFunc)(void *, void *, int, void *)
72+
ctypedef int (*PyArray_CompareFunc)(const void* d1, const void *, void *)
73+
ctypedef int (*PyArray_ArgFunc)(void *, np.npy_intp, np.npy_intp *, void *)
74+
ctypedef void (*PyArray_DotFunc)(void *, np.npy_intp, void *, np.npy_intp, void *, np.npy_intp, void *)
75+
ctypedef int (*PyArray_ScanFunc)(stdio.FILE *, void *, void *, void *)
76+
ctypedef int (*PyArray_FromStrFunc)(char *, void *, char **, void *)
77+
ctypedef np.npy_bool (*PyArray_NonzeroFunc)(void *, void *)
78+
ctypedef void (*PyArray_FillFunc)(void *, np.npy_intp, void *)
79+
ctypedef void (*PyArray_FillWithScalarFunc)(void *, np.npy_intp, void *, void *)
80+
ctypedef int (*PyArray_SortFunc)(void *, np.npy_intp, void *)
81+
ctypedef int (*PyArray_ArgSortFunc)(void *, np.npy_intp *, np.npy_intp, void *)
82+
ctypedef np.NPY_SCALARKIND (*PyArray_ScalarKindFunc)(np.PyArrayObject *)
83+
84+
ctypedef struct PyArray_ArrFuncs:
85+
np.PyArray_VectorUnaryFunc ** cast
86+
PyArray_GetItemFunc *getitem
87+
PyArray_SetItemFunc *setitem
88+
PyArray_CopySwapNFunc *copyswapn
89+
PyArray_CopySwapFunc *copyswap
90+
PyArray_CompareFunc *compare
91+
PyArray_ArgFunc *argmax
92+
PyArray_DotFunc *dotfunc
93+
PyArray_ScanFunc *scanfunc
94+
PyArray_FromStrFunc *fromstr
95+
PyArray_NonzeroFunc *nonzero
96+
PyArray_FillFunc *fill
97+
PyArray_FillWithScalarFunc *fillwithscalar
98+
PyArray_SortFunc *sort
99+
PyArray_ArgSortFunc *argsort
100+
PyObject *castdict
101+
PyArray_ScalarKindFunc *scalarkind
102+
int **cancastscalarkindto
103+
int *cancastto
104+
int listpickle
105+
106+
cdef void PyArray_InitArrFuncs(PyArray_ArrFuncs *)
107+
108+
ctypedef struct PyArray_ArrayDescr:
109+
PyArray_Descr * base
110+
PyObject *shape
111+
112+
cdef void ** PyArray_API
113+
114+
cdef PyTypeObject * PyArrayDescr_Type
115+
116+
ctypedef struct PyArray_Descr:
117+
Py_ssize_t ob_refcnt
118+
PyTypeObject * ob_type
119+
PyTypeObject * typeobj
120+
char kind
121+
char type
122+
char byteorder
123+
int flags
124+
int type_num
125+
int elsize
126+
int alignment
127+
PyArray_ArrayDescr * subarray
128+
PyObject * fields
129+
PyObject * names
130+
PyArray_ArrFuncs * f
131+
132+
cdef int PyArray_RegisterDataType(PyArray_Descr *)
133+
134+
cdef object PyArray_Scalar(void *, PyArray_Descr *, object)
135+
136+
cdef extern from "mypack_extra_types.h" namespace "mypack_extra_types":
137+
cdef cppclass MemoryKnight[T]:
138+
MemoryKnight() nogil except +
139+
T * defnew() nogil except +
140+
T * renew(void *) nogil except +
141+
void deall(T *) nogil except +
142+
143+
# std_string dtype
144+
ctypedef struct PyXDStr_Type:
145+
Py_ssize_t ob_refcnt
146+
PyTypeObject *ob_typ
147+
std_string obval
148+
149+
cdef object pyxd_str_getitem(void * data, void * arr)
150+
cdef int pyxd_str_setitem(object value, void * data, void * arr)
151+
cdef void pyxd_str_copyswapn(void * dest, np.npy_intp dstride, void * src, np.npy_intp sstride, np.npy_intp n, int swap, void * arr)
152+
cdef void pyxd_str_copyswap(void * dest, void * src, int swap, void * arr)
153+
cdef np.npy_bool pyxd_str_nonzero(void * data, void * arr)
154+
155+

0 commit comments

Comments
 (0)