added tsrm parameter to all methods to make it compile on tsrm platforms
fix compile issues for TRSM
fixed compile issues with TSRM enabled