def split_huge_add_or_mul(node):
 if (node.op.scalar_op in (scal.add, scal.mul)):
  max_nb_inputs = max_inputs_to_GpuElemwise(node)
  if ((max_nb_inputs <= 1) and (len(node.inputs) > 1)):
   return False
  while (len(node.inputs) > max_nb_inputs):
   inner_op = []
   for i in xrange(0, len(node.inputs), max_nb_inputs):
    inner_op.append(node.op(*node.inputs[i:(i + max_nb_inputs)]))
   node = node.op(*inner_op).owner
 return node

def split_huge_add_or_mul ( node ) : if ( node . op . scalar_op in ( scal . add , scal . mul ) ) : max_nb_inputs = max_inputs_to_GpuElemwise ( node ) if ( ( max_nb_inputs <= 1 ) and ( len ( node . inputs ) > 1 ) ) : return False while ( len ( node . inputs ) > max_nb_inputs ) : inner_op = [ ] for i in xrange ( 0 , len ( node . inputs ) , max_nb_inputs ) : inner_op . append ( node . op ( * node . inputs [ i : ( i + max_nb_inputs ) ] ) ) node = node . op ( * inner_op ) . owner return node
for add and mul .