The readmode needs to be inferred from the template arguments. Change-Id: I067037035e2492a24eac47e16d4015f879be0ea7