From: Andreas Beckmann Date: Wed, 14 Dec 2022 17:28:36 +0000 (+0100) Subject: [PATCH 28/42] add llvm_cpu to the long device name X-Git-Tag: archive/raspbian/4.0-3+rpi1^2^2~13 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e3e2dd5e78e9ef1d1da20b2bde606d908410a959;p=pocl.git [PATCH 28/42] add llvm_cpu to the long device name Gbp-Pq: Name 0028-add-llvm_cpu-to-the-long-device-name.patch --- diff --git a/lib/CL/devices/cpuinfo.c b/lib/CL/devices/cpuinfo.c index 8e3cda6..a5330b6 100644 --- a/lib/CL/devices/cpuinfo.c +++ b/lib/CL/devices/cpuinfo.c @@ -400,9 +400,12 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_device_id device) #endif /* create the descriptive long_name for device */ - int len = strlen (device->short_name) + (end-start) + 2; + int len = strlen (device->short_name) + 1 + + (device->llvm_cpu ? strlen (device->llvm_cpu) : 0) + 1 + + (end - start) + 1; char *new_name = (char*)malloc (len); - snprintf (new_name, len, "%s-%s", device->short_name, start); + snprintf (new_name, len, "%s-%s-%s", device->short_name, + (device->llvm_cpu ? device->llvm_cpu : ""), start); device->long_name = new_name; /* If the vendor_id field is still empty, we should get the PCI ID associated