Code Monkey home page Code Monkey logo

Comments (6)

khyperia avatar khyperia commented on July 4, 2024

Possibly relevant: https://github.com/hsivonen/simd/blob/045d4dae4e65f99fd43cd9042f5132812cae717e/src/lib.rs#L75-L79

#![feature(repr_simd)]
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy)]
#[repr(simd)]
pub struct f32x4(f32, f32, f32, f32);

from rust-gpu.

khyperia avatar khyperia commented on July 4, 2024

It looks like item 2 is not necessary - seems like #[repr(simd)] is all that needed. So yeah, definitely good first issue! Mostly just step 4 is necessary, although a more senior person digging deeper into points 1 and 3 would be nice - I don't think there's any surprises there, though (but it's good to be sure).

f32x4 is already implemented in spirv-std by copying the above type, but it's just that, and needs all the impls and operators and whatnot (as well as all the other types). Defining all that repitition using macros seems neat.

from rust-gpu.

nipunG314 avatar nipunG314 commented on July 4, 2024

Hi, I would be interested with working on this.

From what I understand in this thread, the first thing to do would be to write the operators and impls for f32x4 using macros?

from rust-gpu.

khyperia avatar khyperia commented on July 4, 2024

Awesome!

This issue is a bit out of date, though: #71 added quite a few vector items. However, it wasn't very cleanly or thoroughly implemented, and needs significant work. Some tasks remaining are:

  1. vec4 and f32x4 are duplicated right now. One of them needs to be removed. Discussing which naming scheme to go with in discord would be nice, if you're able to join there!
  2. A lot of cruft from glam was copied over, this needs to be fixed (e.g. reciprocal), and many weird comments.
  3. There's a lot of duplication: it'd be nice if we could deduplicate with macros or somesuch.
  4. The clippy use_self lint is disabled on spirv-std, primarily due to violations in the vector code, it'd be good to fix those.
  5. Tests are disabled on spirv-std right now, either remove the tests or enable them.

from rust-gpu.

nipunG314 avatar nipunG314 commented on July 4, 2024

Sure. I'll ping you on #rust-gpu on Discord.

from rust-gpu.

khyperia avatar khyperia commented on July 4, 2024

With glam and whatnot in, this is pretty much resolved.

from rust-gpu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.