Skip to content

[FEA]: make bit_cast compatible with vector version and arrays of extended precision types #2445

Description

@fbusato

Is this a duplicate?

Area

libcu++

Is your feature request related to a problem? Please describe.

bit_cast is now compatible with __half, __nv_bfloat16 #2422.
It would be also useful to support __half2, __nv_bfloat162, and array types __half array[4], and cuda::std::array<__half, 4>

Describe the solution you'd like

auto x1 = bit_cast<__half2>(v1);
auto x2 = bit_cast<cuda::std::array<__half, 4>>(v2);

Describe alternatives you've considered

No response

Additional context

No response

Activity

  1. fbusato commented on May 13, 2026

    @fbusato
    ContributorAuthor

    closed by cuda::is_trivially_copyable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

  • Status
    Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions