[llvm] [SYCL] Add platform enumeration and info query using liboffload (PR #166927)
Kseniya Tikhomirova via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 8 10:04:31 PST 2025
KseniyaTikhomirova wrote:
I plan to use the following coding style for libsycl impl:
Given:
General LLVM rule says:
> In general, names should be in camel case (e.g. TextFileReader and isLValue())
and
> As an exception, classes that mimic STL classes can have member names in STL’s style of lowercase words separated by underscores (e.g. begin(), push_back(), and empty()).
SYCL 2020 declare types in STL's style with snake case.
LLVM guide has no requirements about file names so I suggest:
1) all file names under `libsycl` folder (.h, .cpp, .md, etc) will be in snake_case (no exceptions)
2) SYCL API type names - follow SYCL2020 spec naming - snake_case
3) all detail (excluding STL-like types) types to use CamelCase.
changes comparing to impl/llvm:
all API and impl related files are already in snake case but docs and tests use mixed style.
I suggest to use snake_case for all files in repo.
Apply CamelCase to some of our classes, for example platform_impl should become PlatformImpl and so on:
example, see forward decl: https://github.com/intel/llvm/blob/sycl/sycl/source/detail/program_manager/program_manager.hpp#L76
> docs example:
> https://github.com/intel/llvm/blob/sycl/sycl/doc/design/CompileTimeProperties.md
> mixed style examples (see folder names as well)
> https://github.com/intel/llvm/blob/sycl/sycl/test-e2e/AddressCast/dynamic_address_cast.cpp
> https://github.com/intel/llvm/blob/sycl/sycl/unittests/accessor/AccessorImplicitConversion.cpp
> https://github.com/intel/llvm/blob/sycl/sycl/test/e2e_test_requirements/check_e2eexpr_logic.cpp
@bader @tahonermann could you please provide your opinion:
1) should we even align style or it is good to go with what we have in intel/llvm
2) agree or not with proposed strategy
https://github.com/llvm/llvm-project/pull/166927
More information about the llvm-commits
mailing list