summaryrefslogtreecommitdiff
path: root/python/src/sa/_sa.pxd
diff options
context:
space:
mode:
authorVictor Chahuneau <vchahune@cs.cmu.edu>2012-12-23 23:07:31 +0100
committerVictor Chahuneau <vchahune@cs.cmu.edu>2012-12-23 23:07:31 +0100
commite66ce4f37f98af2e23c800c7dc6fd8fc83d07353 (patch)
tree9972e8ed1adeb56ede19b2c6020e92a5116860e4 /python/src/sa/_sa.pxd
parent597d89c11db53e91bc011eab70fd613bbe6453e8 (diff)
Memory mapping for IntList/FloatList
+ vocabulary class for DataArray & BiLex
Diffstat (limited to 'python/src/sa/_sa.pxd')
-rw-r--r--python/src/sa/_sa.pxd16
1 files changed, 15 insertions, 1 deletions
diff --git a/python/src/sa/_sa.pxd b/python/src/sa/_sa.pxd
index f1cd8e29..5c1fce27 100644
--- a/python/src/sa/_sa.pxd
+++ b/python/src/sa/_sa.pxd
@@ -1,26 +1,40 @@
from libc.stdio cimport FILE
+from posix.unistd cimport off_t
+
+cdef class MemoryMap:
+ cdef int fd
+ cdef off_t fs
+ cdef void* map_start
+ cdef void* map_ptr
+ cdef int read_int(self)
+ cdef int* read_int_array(self, int size)
+ cdef char* read_char_array(self, int size)
+ cdef float* read_float_array(self, int size)
cdef class FloatList:
cdef int size
cdef int increment
cdef int len
cdef float* arr
+ cdef object memory
cdef void set(self, int i, float v)
cdef void write_handle(self, FILE* f)
cdef void read_handle(self, FILE* f)
+ cdef void read_mmaped(self, MemoryMap buf)
cdef class IntList:
cdef int size
cdef int increment
cdef int len
cdef int* arr
+ cdef object memory
cdef void set(self, int i, int val)
cdef void _append(self, int val)
- cdef void _extend(self, IntList other)
cdef void _extend_arr(self, int* other, int other_len)
cdef void _clear(self)
cdef void write_handle(self, FILE* f)
cdef void read_handle(self, FILE* f)
+ cdef void read_mmaped(self, MemoryMap buf)
cdef class FeatureVector:
cdef IntList names