SHA256
1
0
forked from pool/clFFT
clFFT/clFFT-avoid-rvalue-address.patch
Martin Hauke 71045aefd9 Accepting request 903571 from home:badshah400:gcc11fix
- Add clFFT-avoid-rvalue-address.patch: Fix building with gcc11 (which is stricter about referencing rvalue addresses) by using ostringstream object directly rather its pointer [gh#clMathLibraries/clFFT#237].
- Add opencl-headers and pkgconfig(OpenCL) to -devel package Requires as these are referenced by clFFT headers and library.
- Use %license for LICENSE file.

OBS-URL: https://build.opensuse.org/request/show/903571
OBS-URL: https://build.opensuse.org/package/show/science/clFFT?expand=0&rev=13
2021-07-02 17:11:56 +00:00

16 lines
937 B
Diff

Index: clFFT-2.12.2/src/library/generator.transpose.cpp
===================================================================
--- clFFT-2.12.2.orig/src/library/generator.transpose.cpp
+++ clFFT-2.12.2/src/library/generator.transpose.cpp
@@ -1089,8 +1089,8 @@ clfftStatus genSwapKernelGeneral(const F
//std::string funcName = "swap_nonsquare_" + std::to_string(smaller_dim) + "_" + std::to_string(dim_ratio);
std::string funcName = "swap_nonsquare_";
- std::string smaller_dim_str = static_cast<std::ostringstream*>(&(std::ostringstream() << smaller_dim))->str();
- std::string dim_ratio_str = static_cast<std::ostringstream*>(&(std::ostringstream() << dim_ratio))->str();
+ std::string smaller_dim_str = (std::ostringstream() << smaller_dim).str();
+ std::string dim_ratio_str = (std::ostringstream() << dim_ratio).str();
if(params.fft_N[0] > params.fft_N[1])
funcName = funcName + smaller_dim_str + "_" + dim_ratio_str;
else