We use them in RVV intrinsics doc but there is no definition
in riscv_vector.h, which is confusing for users. This matches
what GCC does too.
There are too many tests using the raw types, so we keep them
untouched.
Differential D125765
[RISCV] Add type aliases float16_t, float32_t and float64_t wangpc on May 17 2022, 5:02 AM. Authored by
Details We use them in RVV intrinsics doc but there is no definition There are too many tests using the raw types, so we keep them
Diff Detail
Event TimelineComment Actions Besides, should we add vread_csr and vwrite_csr like what in GCC? Comment Actions I think we have no consensus in https://github.com/riscv-non-isa/rvv-intrinsic-doc/issues/18#issuecomment-817890161, and most people disagree the current naming, For example, maybe _Float16 should be supported when enable zvh, not zvfh? Comment Actions Thanks for your reminding of previous discussion!
You mean zfh? float16_t is only used in RVV intrinsics, so I think it is OK to me. And it is the same as generated type aliases in riscv_vector.h(at about line 130): #if defined(__riscv_zvfh) typedef __rvv_float16mf4_t vfloat16mf4_t; typedef __rvv_float16mf2_t vfloat16mf2_t; typedef __rvv_float16m1_t vfloat16m1_t; typedef __rvv_float16m2_t vfloat16m2_t; typedef __rvv_float16m4_t vfloat16m4_t; typedef __rvv_float16m8_t vfloat16m8_t; #endif Comment Actions I think so. But I think maybe we need to raise an issue somewhere (maybe riscv-c-api-doc) to gather opinions from community first. (see below)
Yes, sorry for my typo. I think maybe we need to have more comprehensive consideration about define floating type aliases in RISC-V world. or like https://github.com/riscv-non-isa/riscv-c-api-doc/pull/25, it's trying to define a unified naming rules for all intrinsics.
Comment Actions Sorry for the late reply, I missed this in may mails. I see that the motivation start from where you spotted this type alias. However it was essentially just an act for convenience so we don't have to map a more irregular pattern of ( _Float16, float, double) when generating the test cases by code. Is it necessary that we have them in the header? On the other hand, these are scalar floating-point types, and if we want them to be defined, I agree with Zakk that starting a discussion in riscv-c-api will be helpful. Comment Actions I don't have any thoughts on this patch now. Yeah, I agree. But I won't continue this now. |