On Thu, 23 May 2024 16:06:42 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:
>> I think both `sleefinline_advsimd.h` and `sleefinline_sve.h` are specific >> for arm. >> In the future, on riscv the corresponding file name will be >> `sleefinline_rvvm1.h`. >> >> Only `misc.h` is a generic file shared among platforms. > > Oh, you mean that the `sve` suffix signals that it is for ARM. I thought you > were talking about having a name like `sleefinline_aarch64.h`. > > Sure, if the only files generated by sleef are ever .h files, the logic for > chosing which to include can be done entirely by `#ifdef`s in the source > code. But if there ever needs to be different .c or .cpp files to include in > the build, the build system needs to be able to determine automatically if > they should be included or included, and that can only be made if the path or > the file name includes the CPU moniker. > > Personally, I think it would show good alignment with the prevailing norms in > the JDK to also use this way of naming files for .h files. But I confess that > for .h files it is more a matter of style, rather than a necessity from the > build system. Thanks for the information. I think the files from sleef will be .h headers only. I'm also fine to align with prevailing norms in the JDK, it's always good to do so. Just a reminder for us in the future discussion of https://github.com/openjdk/jdk/pull/18605, maybe we should consider this dir or file naming norms (e.g. currently there are vector_math_sve.c and vector_math_neon.c under src/jdk.incubator.vector/linux/native/libvectormath), as there will be more files related to different platforms added in the future, e.g. riscv64. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19185#discussion_r1612933942