Skip to content

Consider adding HalfToInt16Bits and Int16BitsToHalf to BitConverter #38288

@pgovind

Description

@pgovind

#37630 adds HalfToInt16Bits and Int16BitsToHalf as internal methods to BitConverter. We should consider exposing them as public.

Proposed API

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        internal static unsafe short HalfToInt16Bits(Half value);

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        internal static unsafe Half Int16BitsToHalf(short value);

cc: @tannergooding

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions