Skip to content
This repository was archived by the owner on Sep 13, 2025. It is now read-only.
This repository was archived by the owner on Sep 13, 2025. It is now read-only.

Unit mismatch in SIMD vector length? #7

@DarthPumpkin

Description

@DarthPumpkin

In simd.zig, the vector length is computed as

comptime var vector_len = std.atomic.cache_line / @sizeOf(f32);

It looks to me like there is a unit mismatch here. std.atomic.cache_line is measured in bits, while @sizeOf(f32) is in bytes. Perhaps you are looking for @bitSizeOf(f32)? Or you could use std.simd.suggestVectorLength(), which does something similar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions