#NEWLINE# def simple_smem( ary ) : #NEWLINE# #INDENT# N = 100 #NEWLINE# sm = cuda . shared . array ( N , int32 ) #NEWLINE# i = cuda . grid ( 1 ) #NEWLINE# if ( i == 0 ) : #NEWLINE# #INDENT# for j in range ( N ) : #NEWLINE# #INDENT# sm [ j ] = j #NEWLINE# #UNINDENT# #UNINDENT# cuda . syncthreads ( ) #NEWLINE# ary [ i ] = sm [ i ]