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=25)
    return memoize(f)
Exemplo n.º 2
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=25)
    return memoize(f)
Exemplo n.º 3
0
def dp_memoize_instance(f):
    memoize = memoize_limited(max_size=None, max_mem_MB=100)
    return memoize(f)
Exemplo n.º 4
0
def dp_memoize_instance(f):
    memoize = memoize_limited(max_size=None, max_mem_MB=100)
    return memoize(f)
Exemplo n.º 5
0
 def dec():
     """ Returns the decorator """
     return memoize_limited(max_size=None, max_mem_MB=25)
Exemplo n.º 6
0
 def dec():
     """ Returns the decorator """
     return memoize_limited(max_size=None, max_mem_MB=25)