* Switch from own memory class to cymem, in pip

This commit is contained in:
Matthew Honnibal 2014-09-17 23:09:24 +02:00
parent 6266cac593
commit ac522e2553
10 changed files with 11 additions and 9 deletions

View File

@ -1,5 +1,6 @@
cython
fabric
cymem
pytest
sphinx
sphinxcontrib-napoleon

View File

@ -56,8 +56,6 @@ exts = [
include_dirs=includes),
Extension("spacy.tokens", ["spacy/tokens.pyx"], language="c++",
include_dirs=includes),
Extension("spacy.memory", ["spacy/memory.pyx"], language="c++",
include_dirs=includes)
]

View File

@ -1,5 +1,5 @@
from libc.stdint cimport uint64_t
from .memory cimport Address
from cymem.cymem cimport Address
ctypedef uint64_t key_t
ctypedef void* val_t

View File

@ -1,5 +1,5 @@
# cython: profile=True
from .memory cimport Address
from cymem.cymem cimport Address
cimport cython

View File

@ -5,7 +5,7 @@ from spacy.tokens cimport Tokens
from spacy.lexeme cimport LexemeC
from spacy._hashing cimport PointerHash
from spacy.memory cimport Pool
from cymem.cymem cimport Pool
from libcpp.utility cimport pair
from libcpp.vector cimport vector

View File

@ -19,7 +19,7 @@ from murmurhash.mrmr cimport hash64
from cpython.ref cimport Py_INCREF
from .memory cimport Pool
from cymem.cymem cimport Pool
from cython.operator cimport preincrement as preinc
from cython.operator cimport dereference as deref

View File

@ -1,5 +1,5 @@
from .typedefs cimport hash_t, utf8_t, flag_t, id_t
from .memory cimport Pool
from cymem.cymem cimport Pool
cdef struct LexemeC:

View File

@ -1,5 +1,5 @@
from cpython.ref cimport Py_INCREF
from .memory cimport Pool
from cymem.cymem cimport Pool
cdef LexemeC* lexeme_init(Pool mem, unicode string, double prob, size_t cluster,

View File

@ -1,6 +1,7 @@
from libcpp.vector cimport vector
from cymem.cymem cimport Pool
cdef class Pool:
cdef class _Pool:
cdef vector[void*] _addresses
cdef void* alloc(self, size_t number, size_t size) except NULL

View File

@ -3,6 +3,8 @@ from libc.string cimport memset
from libcpp.vector cimport vector
from cymem cimport Pool
cdef class Pool:
def __cinit__(self):