Giter VIP home page Giter VIP logo

Comments (2)

gquintin avatar gquintin commented on August 21, 2024

Hi NK-Nikunj,

The error you are facing is the expected behavior of NSIMD. Let me give you details: the shr, shl and shra operators work on integer types only (hence the error) and work element-wise. I mean that

v = [1 ; 2 ; 3 ; 4]
v << n == [1 << n ; 2 << n ; 3 << n ; 4 << n]

From what you describe, what you want is a shuffle but we do not have this one yet. Moreover I have questions for you on what you want exactly :

  • Do you want this shuffle to work on a 4-elements basis i mean given v = [1 ; 2 ; 3 ; 4 ; 5 ; 6 ; 7 ; 8 ]:

    shuffle(v, 1) = [ 2 ; 3 ; 4 ; 1 ; 6 ; 7 ; 8 ; 5 ]
    

    or

    shuffle(v, 1) = [ 2 ; 3 ; 4 ; 5 ; 6 ; 7 ; 8 ; 1 ]
    

    ?

  • Do you want it only a 4-elements SIMD vectors? Do your algorithm have this constraint? Do you want it to be length agnostic?

I am asking you these according to #8, there are two ways to have shuffles length angostic.

from nsimd.

NK-Nikunj avatar NK-Nikunj commented on August 21, 2024

@gquintin I want it to be length agnostic. My apologies, I should've seen this comment before.

from nsimd.

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.