Kernel info
by nicola.zaurino＠virgilio.it

Hi everyone,I'll explain my problem. I created the following code in python. This code implements the Nussinov's algoritm.
from numpy import *from matplotlib import *
seq='AACUUCUUCAA'
def score_bpair(seq,i,j,soglia=2): score={('A','U'):1,('U','A'):1,('C','G'):1,('G','C'):1} a=seq[i] b=seq[j] if(abs(i-j)<soglia or((a,b) not in score.keys())): return 0 else: return score[(a,b)]
def nussinov(seq): L=len(seq); smat=zeros((L,L)); #array (L,L) for s in xrange(1,L): for i in xrange(0,L-s): j=i+s maxfork=0 for k in xrange(i,j-1): maxfork=max(maxfork,smat[i][k]+smat[k+1][j]) smat[i][j]=max((smat[i+1][j-1]+score_bpair(seq,i,j)),maxfork) smat[j][i]=smat[i][j] #completa la matrice in modo simmetrico return(smat)
Now I would like to implement this algortm using pycuda's library. What can I write into the Kernel function to run the same algoritm faster using pycuda?