Comments (2)
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.
@gquintin I want it to be length agnostic. My apologies, I should've seen this comment before.
from nsimd.
Related Issues (20)
- Performance different on X86 and ARM service HOT 2
- Vector<nsimd::pack<T>> HOT 4
- Support Reg Size /2 HOT 1
- NSIMD generates too much assembly HOT 5
- There is not ‘&’ bitwise operator for ’packl‘ type and no conversion of 'pack' and 'packl' type
- nsimd defines `i64` etc. in global namespace HOT 3
- Provide a C11 API for core
- NSIMD SVE intrinsics generates movprfx HOT 3
- Provide cbrt HOT 1
- Provide += operators etc.
- mask_for_loop_tail produces scalar code HOT 2
- Provide fabs, fmax, fmin HOT 2
- Use Sleef math functions to complete NSIMD
- Provide more "inline" operators such as copysign, isfinite, etc... HOT 2
- Implement a `flipsign` function HOT 1
- Provide a constexpr size function HOT 4
- Compile nsimd-2.2 on the ARM server HOT 2
- Document "andnot"
- Calculate i32 horizontal sum in nsimd. HOT 3
- Feature request: allow logical arguments for if_else1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nsimd.