Example #1
0
import chill

chill.source('src/mm.c')
chill.destination('src/mm_modified.c')
chill.procedure('mm')

chill.loop(0)

chill.known('ambn > 0')
chill.known('an > 0')
chill.known('bm > 0')

chill.peel( 0, 2, -4 ) # statement 0, loop 2 (middle, for j), 4 statements from END


Example #2
0
import chill

chill.source("src/applyR.c")
chill.destination("src/applyR_modified.c")

chill.procedure("applyR")

chill.loop(1)
chill.known("len >= 0")
chill.permute([2, 1])

chill.loop(2)
chill.permute([2, 1])
chill.tile(0, 1, 16)
# Loop fusion etc here

chill.loop(3)
chill.tile(0, 1, 16)
Example #3
0
import chill

chill.source('src/nonexistent.c')
chill.destination('src/errrrr.c')
chill.procedure('foo')
chill.loop(0)
Example #4
0
import chill

chill.source( 'src/singleloop.c' )
chill.destination( 'src/singleloop_modified.c' )
chill.procedure( 'foo' )
chill.loop( 0 )

chill.original()
chill.print_code()
Example #5
0
import chill

chill.source("householder2.c")
chill.destination("householder2_modified.c")

chill.procedure("matmul")
chill.loop(0)

print("function 1")

chill.known("M >= 0")
chill.known("K >= 0")
chill.known("N >= 0")

chill.permute([1, 3, 2])
chill.tile(0, 2, 16)

chill.procedure("applyR")
chill.known("len >= 0")

chill.loop(1)
chill.permute([2, 1])

chill.loop(2)
chill.permute([2, 1])
chill.tile(0, 1, 16)
# Loop fusion etc here

chill.loop(3)
chill.tile(0, 1, 16)
Example #6
0
import chill

chill.source('src/nestedloops.c')
chill.destination('src/nestedloops_modified.c')
chill.procedure('foo')
chill.loop(0)

chill.permute([2, 3, 1])
chill.unroll(0, 3, 2)
Example #7
0
import chill

chill.source( "src/matmul.c" )
chill.destination( "src/matmul_modified.c" )

chill.procedure( "matmul" )
chill.loop( 0 )

#chill.known( "M >= 0" )
#chill.known( "K >= 0" )
#chill.known( "N >= 0" )

#chill.permute( [1, 3, 2] )
#chill.tile( 0, 2, 16 )