Giter Site home page Giter Site logo

Comments (6)

topperc avatar topperc commented on July 20, 2024 1

You can use vundefined for the first vset.

vint32m4_t A;
A = __riscv_vset_v_i32_m1_i32m4(__riscv_vundefined_i32m4(), 0, t0);
A = __riscv_vset_v_i32_m1_i32m4(A, 1, t1);
A = __riscv_vset_v_i32_m1_i32m4(A, 2, t2);
A = __riscv_vset_v_i32_m1_i32m4(A, 3, t3);

from rvv-intrinsic-doc.

kito-cheng avatar kito-cheng commented on July 20, 2024

Maybe just use vsetvl_e16m4 and vle32_v_i32m4?

        int32_t a[16] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
        size_t vl = vsetvl_e16m4 (16);
        vint32m4_t t0 = vle32_v_i32m4(ee,vl);

from rvv-intrinsic-doc.

topperc avatar topperc commented on July 20, 2024

vcreate was removed from the spec for a period of time. It was added back in #286

Your intrinsics aren't prefixed with __riscv_ so it looks like you're using an older implementation?

If you are using an older implementation, you should be able to use multiple vset intrinsics.

from rvv-intrinsic-doc.

Erucaaa avatar Erucaaa commented on July 20, 2024

Maybe just use vsetvl_e16m4 and vle32_v_i32m4?

        int32_t a[16] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
        size_t vl = vsetvl_e16m4 (16);
        vint32m4_t t0 = vle32_v_i32m4(ee,vl);

Thanks, But i may need to deal with each vector register separately and then build a group to store them back.

from rvv-intrinsic-doc.

Erucaaa avatar Erucaaa commented on July 20, 2024

vcreate was removed from the spec for a period of time. It was added back in #286

Your intrinsics aren't prefixed with __riscv_ so it looks like you're using an older implementation?

If you are using an older implementation, you should be able to use multiple vset intrinsics.

Thanks. vset requires a group of registers as parameters. So, we're back to this question again: how do you build a group of registers in intrinsics....
图片

from rvv-intrinsic-doc.

Erucaaa avatar Erucaaa commented on July 20, 2024

You can use vundefined for the first vset.

vint32m4_t A;
A = __riscv_vset_v_i32_m1_i32m4(__riscv_vundefined_i32m4(), 0, t0);
A = __riscv_vset_v_i32_m1_i32m4(A, 1, t1);
A = __riscv_vset_v_i32_m1_i32m4(A, 2, t2);
A = __riscv_vset_v_i32_m1_i32m4(A, 3, t3);

Thanks!!! I got the true result!

from rvv-intrinsic-doc.

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.