Replace swich case with refCastFrom()
Much better inputs handling for the Slice, Gather and Reshape operators.
Current implementation will fail in each of these cases:
- Use of any other data type than float, double, int64 or int32 for the inputs;
- Inputs from another backend => operators not usable of GPU!
Also:
- The
forwardDims()
mechanism with theallowDataDependency
argument was no used as intended. Output should never be resized in the Operator implementation. Actually, no memory allocation should be performed here. All dims must be known and allocated for the implementation; - There was a huge bug in Tensor registration for Int64: type
long
was used, which is not garanteed to be 64-bits (it is not on MSVC!)
Please read carefully the changes to understand the intended way to handle output dims data dependent operators.
Edited by Olivier BICHLER