#NEWLINE# def __init__( self , default , * options , **kwargs ) : #NEWLINE# #INDENT# self . default = default #NEWLINE# def filter( val ) : #NEWLINE# #INDENT# if ( ( val == self . default ) or val . startswith ( 'gpu' ) or val . startswith ( 'opencl' ) or val . startswith ( 'cuda' ) ) : #NEWLINE# #INDENT# return val #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( ( 'Invalid value ("%s") for configuration variable "%s". Valid options start with one of "%s", "gpu", "opencl", "cuda"' % ( self . default , val , self . fullname ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# over = kwargs . get ( 'allow_override' , True ) #NEWLINE# super ( DeviceParam , self ) . __init__ ( self , filter , over )