This patch adds support for scalar results to the client/server
protocol and tests. In addition to `TensorData`, a new type
`ScalarData` is added. Previous representations of scalar values using
one-dimensional `TensorData` instances have been replaced with proper
instantiations of `ScalarData`.
The generic use of `TensorData` for scalar and tensor values has been
replaced with uses of a new variant `ScalarOrTensorData`, which can
either hold an instance of `TensorData` or `ScalarData`.
Returning tensors with elements whose width is not equal to 64 results
in garbled data. This commit extends the `TensorData` class used to
represent tensors in JIT compilation with support for signed /
unsigned elements of 8/16/32 and 64 bits, such that all clear text
tensors with up to 64 bits can be represented accurately.
The function `tensorDataFromMemRef` reading elements from a result
memref and copying them to an instance of `TensorData` fails to handle
memrefs with non-zero offsets as it adds the offset twice when
calculating indexes. This may result in out-of-bounds memory accesses
and incorrect results.
This patch fixes the calculation of indexes by removing the second
addition of the offset.