KhronosGroup / SYCL-CTS

SYCL Conformance Tests
Apache License 2.0
62 stars 80 forks source link

Remove mixed use of tabs and spaces #936

Closed frasercrmck closed 1 month ago

frasercrmck commented 1 month ago

Tabs can been replaced with spaces as spaces were predominant. Formatting was done with clang-format on functions containing tabs - rather than the whole file - to try and reduce the diff.

The mixed tabs and spaces can cause issues in readability, for instance misleading indentation (some compilers pick up on this).

psalz commented 1 month ago

AFAIK this file was copied from the corresponding file in the OpenCL CTS, so I wonder if instead of reformatting it ourselves, we should just pull in the newer upstream version.

frasercrmck commented 1 month ago

AFAIK this file was copied from the corresponding file in the OpenCL CTS, so I wonder if instead of reformatting it ourselves, we should just pull in the newer upstream version.

Yeah maybe that's a better way of doing it. Though we'd either have to examine the differences between the two files and/or trust that our testing is robust enough to catch the inevitable minor differences in reference maths that'll come with taht.

frasercrmck commented 1 month ago

That said, since upstream's version has already been formatted, I wonder if it would make sense for us to format our copy first before pulling, so that any differences between the two files would become more apparent, especially for reviewers?

psalz commented 1 month ago

Yes, although the OpenCL CTS uses a different clang-format configuration. I'm actually not sure where this file was taken from originally, because the version in the first public commit of the OpenCL CTS is already different (mostly whitespace changes as far as I can tell). Maybe we should start by updating to that version, and then see if we need any of the newer changes made since then.