示例#1
0
 def __init__(self,sz,itemsz=1):
   "sz is byte count"
   self.a=sonic.array_new(sz)
   self.sz=sonic.array_sz(self.a) # bytecount
   self.mem=sonic.array_mem(self.a)
   self.itemsz=itemsz # used for indexing
   log(self)
示例#2
0
 def __init__(self,array,start,end):
   self.a=sonic.array_new_sub(array.a,start,end)
   self.mem=sonic.array_mem(self.a)
   self.sz=sonic.array_sz(self.a)
示例#3
0
 def __init__(self,filename):
   self.filename=filename
   self.a=sonic.array_new_mmap(filename)
   self.sz=sonic.array_sz(self.a)
   self.mem=sonic.array_mem(self.a)