Templates should assign parameters to avoid side-effect/calling procs twice 
See: https://github.com/nim-lang/opencl/pull/3#discussion_r171216853

An example is `map_inline`

```Nim
template map_inline*[T](t: Tensor[T], op:untyped): untyped =

  type outType = type((
    block:
      var x{.inject.}: type(items(t));
      op
  ))

  var dest = newTensorUninit[outType](t.shape)
  withMemoryOptimHints()
  let data{.restrict.} = dest.dataArray # Warning ⚠: data pointed to will be mutated

  omp_parallel_blocks(block_offset, block_size, dest.size):
    for i, x {.inject.} in enumerate(t, block_offset, block_size):
      data[i] = op
  dest
```

If the input `t` is the result of `foo(a)`, `foo(a)` would be substituted in t.shape and enumerate(t, ...). If t does not have side-effects, the compiler will probably optimize the second call, but if there are they will be triggered twice.