#NEWLINE# def __init__( self , threadnum = 256 , blocknum = 30 , GPU_direct = False ) : #NEWLINE# #INDENT# self . fall_back = PSICOMP_RBF ( ) #NEWLINE# from pycuda.compiler import SourceModule #NEWLINE# import GPy.util.gpu_init #NEWLINE# self . GPU_direct = GPU_direct #NEWLINE# self . gpuCache = None #NEWLINE# self . threadnum = threadnum #NEWLINE# self . blocknum = blocknum #NEWLINE# module = SourceModule ( ( ( ( '#define THREADNUM ' + str ( self . threadnum ) ) + '\n' ) + gpu_code ) ) #NEWLINE# self . g_psi1computations = module . get_function ( 'psi1computations' ) #NEWLINE# self . g_psi1computations . prepare ( 'PPdPPPPiii' ) #NEWLINE# self . g_psi2computations = module . get_function ( 'psi2computations' ) #NEWLINE# self . g_psi2computations . prepare ( 'PPPdPPPPiii' ) #NEWLINE# self . g_psi1compDer = module . get_function ( 'psi1compDer' ) #NEWLINE# self . g_psi1compDer . prepare ( 'PPPPPPPdPPPPiii' ) #NEWLINE# self . g_psi2compDer = module . get_function ( 'psi2compDer' ) #NEWLINE# self . g_psi2compDer . prepare ( 'PPPPPPPdPPPPiii' ) #NEWLINE# self . g_compDenom = module . get_function ( 'compDenom' ) #NEWLINE# self . g_compDenom . prepare ( 'PPPPii' )