• Allison Vacanti's avatar
    Modify VariantAH::AsVirtual to cast to new ValueType if needed. · e1f5c4dd
    Allison Vacanti authored
    E.g:
    
    ```
        ArrayHandle<Float64> doubleArray;
        VariantArrayHandle varHandle{doubleArray};
        ArrayHandleVirtual<Float32> = varHandle.AsVirtual<Float32>();
    ```
    
    If there is a loss in range and/or precision, a warning is logged. If
    the ValueTypes are Vecs with mismatched widths, an ErrorBadType is thrown.
    Internally, an ArrayHandleCast is used between the VariantArrayHandle's
    stored array and the ArrayHandleVirtual.
    e1f5c4dd
Variant_AsVirtual_force_cast.md 311 Bytes