#NEWLINE# def __init__( self ) : #NEWLINE# #INDENT# def filter( val ) : #NEWLINE# #INDENT# if ( val == '' ) : #NEWLINE# #INDENT# return val #NEWLINE# #UNINDENT# for v in val . split ( ';' ) : #NEWLINE# #INDENT# s = v . split ( '->' ) #NEWLINE# if ( len ( s ) != 2 ) : #NEWLINE# #INDENT# raise ValueError ( ( 'Malformed context map: %s' % ( v , ) ) ) #NEWLINE# #UNINDENT# if ( ( s [ 0 ] == 'cpu' ) or s [ 0 ] . startswith ( 'cuda' ) or s [ 0 ] . startswith ( 'opencl' ) ) : #NEWLINE# #INDENT# raise ValueError ( ( 'Cannot use %s as context name' % ( s [ 0 ] , ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# return val #NEWLINE# #UNINDENT# ConfigParam . __init__ ( self , '' , self , False )