function complex(args) {
    const { inputs, backend } = args;
    const { real, imag } = inputs;
    const complexInfo = backend.makeTensorInfo(real.shape, "complex64");
    const complex = backend.texData.get(complexInfo.dataId);
    const realTensorInfo = (0, _identity.identity)({
        inputs: {
            x: real
        },
        backend
    });
    const imagTensorInfo = (0, _identity.identity)({
        inputs: {
            x: imag
        },
        backend
    });
    complex.complexTensorInfos = {
        real: realTensorInfo,
        imag: imagTensorInfo
    };
    return complexInfo;
}
In WebGL data is stored in GPU textures which can't be efficiently copied, so
complex tensors share data with their real and imaginary components. Complex
tensors' reference to the components is tracked by refCount on the individual
component. The refCounts are increased by the identity call.

When a complex tensor is disposed, it will reduce the refCount on the
components by calling disposeData on each.