#NEWLINE# def c_code( self , node , name , inputs , outputs , sub ) : #NEWLINE# #INDENT# dtype = node . inputs [ 0 ] . dtype #NEWLINE# typecode = pygpu . gpuarray . dtype_to_typecode ( dtype ) #NEWLINE# vars = dict ( A = inputs [ 0 ] , B = inputs [ 1 ] , dtype = node , out = outputs [ 0 ] , typecode = typecode , fail = sub [ 'fail' ] , name = name ) #NEWLINE# code = ( '\n        double one = 1.;\n        double zero = 0.;\n\n        size_t dims[] = {0, 0};\n        dims[0] = PyGpuArray_DIMS(%(A)s)[0];\n        dims[1] = PyGpuArray_DIMS(%(B)s)[1];\n\n        if (theano_prep_output(&%(out)s, 2, dims, %(typecode)s, GA_C_ORDER,\n                               %(A)s->context)) {\n            %(fail)s\n        }\n\n        if (pygpu_blas_rgemm(cb_no_trans, cb_no_trans,\n                             one,\n                             %(A)s, %(B)s,\n                             zero,\n                             %(out)s, 0) == -1) {\n            %(fail)s\n        }\n        ' % vars ) #NEWLINE# if config . gpuarray . sync : #NEWLINE# #INDENT# code += ( '\n            GpuArray_sync(&%(out)s->ga);\n            ' % vars ) #NEWLINE# #UNINDENT# return code