GithubHelp home page GithubHelp logo

Comments (5)

jiegec avatar jiegec commented on June 29, 2024

If you meant to check if the whole SIMD Register is all-zero, you can use vseteqz.v and read the result from fcc. If you meant to check the zero elements of SIMD Register, you can use vmsknz.b/h/w/d and invert the result with vnor.v.

from la-abi-specs.

trcrsired avatar trcrsired commented on June 29, 2024

Any documentations on functionalities of all the simd instruction and its intrinsics?

What i am doing here is that i have a
simd_vector<char,16> v;
if(is_all_zero(v))
{
blah blah blah
}

https://github.com/trcrsired/fast_io/blob/master/include/fast_io_core_impl/simd/is_all_zeros.h#L81

Btw, does it provide instruction for creating mask like __builtin_ia32_pmovmskb128?

from la-abi-specs.

jiegec avatar jiegec commented on June 29, 2024

Any documentations on functionalities of all the simd instruction and its intrinsics?

The official manual is not yet released, but there is an unofficial one by me: http://jia.je/unofficial-loongarch-intrinsics-guide/

from la-abi-specs.

jiegec avatar jiegec commented on June 29, 2024

simd_vector<char,16> v;
if(is_all_zero(v))
{
blah blah blah
}

You can use __lsx_bz_v for this.

from la-abi-specs.

jiegec avatar jiegec commented on June 29, 2024

Btw, does it provide instruction for creating mask like __builtin_ia32_pmovmskb128?

I think you can use __lsx_vmskltz_b + __lsx_vpickve2gr_h to achieve the same effect.

from la-abi-specs.

Related Issues (4)

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.