PlayGround

<sxh lara; first-line: 70; highlight: [75,78]; toolbar: false; > aspectdef SpecializeKernel

input lowT, highT end

function if

call spCall: PrepareSpecialize('kernel','size');

select fCall{'kernel'}.arg{'size'} end

apply dynamic 

replace

	call spOut : Specialize($call, $arg.name, $arg.runtimeValue);
	call UnrollInnermostLoops(spOut.$func, $arg.runtimeValue); 
	call AddVersion(spCall, spOut.$func, $arg.runtimeValue);  
end
condition
	$arg.runtimeValue >= lowT && 
	$arg.runtimeValue <= highT
end

end </sxh>