agd.Eikonal.HFM_CUDA
This package is implementation detail for a GPU accelerated eikonal solver. It should not be used directly, but through the parent package. (Run method of the dictIn class, with mode='gpu'.)
1# Copyright 2020 Jean-Marie Mirebeau, University Paris-Sud, CNRS, University Paris-Saclay 2# Distributed WITHOUT ANY WARRANTY. Licensed under the Apache License, Version 2.0, see http://www.apache.org/licenses/LICENSE-2.0 3 4""" 5This package is implementation detail for a GPU accelerated eikonal solver. It should 6not be used directly, but through the parent package. (Run method of the dictIn class, 7with mode='gpu'.) 8""" 9 10def RunGPU(hfmIn,*args,cache=None,**kwargs): 11 """ 12 Runs the GPU eikonal solver. 13 14 Main input: 15 - hfmIn : a dictionary like-structure 16 17 The solver embeds some help information, which can be accessed as follows. 18 * set hfmIn['verbosity'] to 1 or 2 to display information on run, including the defaulted keys. 19 set to 0 to silence the run. 20 * look at hfmOut['keys']['help'] to see a basic help regarding each key, 21 where hfmOut is the output of this function. 22 """ 23 if cache is not None: print(f"Warning : gpu eikonal solver does not support caching") 24 from . import _Interface 25 return _Interface.Interface(hfmIn).Run(*args,**kwargs) 26 27 # Arguments for glued domains : glue, far, niter, nitergeo 28 # Run niter times, while pasting the values 29 # Extract geodesics. Stop them when too far. 30 # -> reintroduce suitable seed 31 # -> stop when leave domain. Use InWall stopping criterion, 32 # by setting the distance to infinity when far (?) 33 # In that case, we do not really need a predicate... 34 # -> Present geodesics as successions of pieces 35 36 37 38 39class EikonalGPU_NotImplementedError(Exception): 40 def __init__(self,message): 41 super(EikonalGPU_NotImplementedError,self).__init__(message)
def
RunGPU(hfmIn, *args, cache=None, **kwargs):
11def RunGPU(hfmIn,*args,cache=None,**kwargs): 12 """ 13 Runs the GPU eikonal solver. 14 15 Main input: 16 - hfmIn : a dictionary like-structure 17 18 The solver embeds some help information, which can be accessed as follows. 19 * set hfmIn['verbosity'] to 1 or 2 to display information on run, including the defaulted keys. 20 set to 0 to silence the run. 21 * look at hfmOut['keys']['help'] to see a basic help regarding each key, 22 where hfmOut is the output of this function. 23 """ 24 if cache is not None: print(f"Warning : gpu eikonal solver does not support caching") 25 from . import _Interface 26 return _Interface.Interface(hfmIn).Run(*args,**kwargs) 27 28 # Arguments for glued domains : glue, far, niter, nitergeo 29 # Run niter times, while pasting the values 30 # Extract geodesics. Stop them when too far. 31 # -> reintroduce suitable seed 32 # -> stop when leave domain. Use InWall stopping criterion, 33 # by setting the distance to infinity when far (?) 34 # In that case, we do not really need a predicate... 35 # -> Present geodesics as successions of pieces
Runs the GPU eikonal solver.
Main input:
- hfmIn : a dictionary like-structure
The solver embeds some help information, which can be accessed as follows.
- set hfmIn['verbosity'] to 1 or 2 to display information on run, including the defaulted keys. set to 0 to silence the run.
- look at hfmOut['keys']['help'] to see a basic help regarding each key, where hfmOut is the output of this function.
class
EikonalGPU_NotImplementedError(builtins.Exception):
40class EikonalGPU_NotImplementedError(Exception): 41 def __init__(self,message): 42 super(EikonalGPU_NotImplementedError,self).__init__(message)
Common base class for all non-exit exceptions.
Inherited Members
- builtins.BaseException
- with_traceback
- add_note
- args