In C++17 the return type of std::filesystem::path::u8string() is
std::string, but in C++20 the return type changed to std::u8string.
Add a helper to copy a std::u8string to a std::string, to be used when a
std::string is required. This fixes the build for C++20.
There are two changes in total. The first one to fix a small issue of
current working directory so that second change can be applied. And the
second one is for resolving #852 Removing hard-coded SPIR-V binaries in
clUnloadPlatformCompiler tests.
Fixes#852
---------
Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
Signed-off-by: Xing Huang <xing.huang@arm.com>
Printing of a `size_t` requires the `%zu` specifier.
This fixes occurrences where the previous wrong specifier appears to
work in a typical 64-bit build, but causes a Wformat warning in 32-bit
builds.
---------
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
* Update test_compile.cpp
Prevent the error:
"variable 'temp' is uninitialized when used here"
Since one of the generated kernels starts with:
__kernel void sample_test(__global float *src, __global int *dst)
{
float temp;
int tid = get_global_id(0);
dst[tid] = dst[tid] + temp;
* Update test_compile.cpp
clang format
* Update test_compile.cpp
Change the "0.0" literal to "0.0f" for devices that don't support FP64.
The result of the `strdup` was never freed. The string duplication
isn't necessary, so remove it.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>