def generateReport(self, report):
     report.name = self.name
     report.fractionOfUsedMemoryDirty = self.fractionOfUsedMemoryDirty()
     report.usedMemory = self.usedMemory()
     report.lastAccessTime = self.lastAccessTime()
     report.type = type(self)
     report.id = id(self)
    
     for i, (b_ind, block) in enumerate(self._labelers.iteritems()):
         start = self._blockShape*self._flatBlockIndices[b_ind]
         stop  = numpy.minimum(start + self._blockShape, self.Output.meta.shape)
        
         n = MemInfoNode()
         n.roi = (start, stop)
         report.children.append(n)
         block.generateReport(n)
Exemplo n.º 2
0
    def generateReport(self, report):
        report.name = self.name
        report.fractionOfUsedMemoryDirty = self.fractionOfUsedMemoryDirty()
        report.usedMemory = self.usedMemory()
        report.lastAccessTime = self.lastAccessTime()
        report.type = type(self)
        report.id = id(self)

        for b_ind, block in self._cache_list.iteritems():
            start = self._blockShape * self._get_block_multi_index(b_ind)
            stop = numpy.minimum(start + self._blockShape, self.Output.meta.shape)

            n = MemInfoNode()
            n.roi = (start, stop)
            report.children.append(n)
            block.generateReport(n)
Exemplo n.º 3
0
 def generateReport(self, report):
     report.name = self.name
     report.fractionOfUsedMemoryDirty = self.fractionOfUsedMemoryDirty()
     report.usedMemory = self.usedMemory()
     report.lastAccessTime = self.lastAccessTime()
     report.type = type(self)
     report.id = id(self)
    
     for i, (b_ind, block) in enumerate(self._labelers.iteritems()):
         start = self._blockShape*self._flatBlockIndices[b_ind]
         stop  = numpy.minimum(start + self._blockShape, self.Output.meta.shape)
        
         n = MemInfoNode()
         n.roi = (start, stop)
         report.children.append(n)
         block.generateReport(n)
Exemplo n.º 4
0
 def generateReport(self, report):
     report.name = self.name
     report.fractionOfUsedMemoryDirty = self.fractionOfUsedMemoryDirty()
     report.usedMemory = self.usedMemory()
     report.lastAccessTime = self.lastAccessTime()
     report.type = type(self)
     report.id = id(self)
    
     for b_ind, block in self._cache_list.iteritems():
         start = self._blockShape*self._get_block_multi_index(b_ind)
         stop  = numpy.minimum(start + self._blockShape, self.Output.meta.shape)
         
         n = MemInfoNode()
         n.roi = (start, stop)
         report.children.append(n)
         block.generateReport(n)
Exemplo n.º 5
0
 def _updateReport(self):
     reports = []
     for c in self.memMgr.namedCaches:
         r = MemInfoNode()
         try:
             c.generateReport(r)
             reports.append(r)
         except NotImplementedError:
             warnings.warn('cache operator {} does not implement generateReport()'.format(c))
     self._showReports(reports)
     
     '''
    def generateReport(self, report):
        report.name = self.name
        report.fractionOfUsedMemoryDirty = self.fractionOfUsedMemoryDirty()
        report.usedMemory = self.usedMemory()
        report.lastAccessTime = self.lastAccessTime()
        report.dtype = self.Output.meta.dtype
        report.type = type(self)
        report.id = id(self)
        sh = self.Output.meta.shape
        if sh is not None:
            report.roi = ([0] * len(sh), sh)

        for i, iOp in enumerate(self._innerOps):
            n = MemInfoNode()
            report.children.append(n)
            iOp.generateReport(n)