Exemplo n.º 1
0
def dp_memoize_instance(f):
    """ 
        This is the decorator used for functions that return 
        large objects, such as UncertainImage and Diffeomorphism2D.
        
        This is a place where we can turn on/off the memoization.
        
        In the future we will have a smarter strategy.
    """
     
    memoize = memoize_limited(max_size=None, max_mem_MB=100)
    return memoize(f)
Exemplo n.º 2
0
 def dec():
     """ Returns the decorator """
     return memoize_limited(max_size=None, max_mem_MB=25)