From 3c93d168e6afc8a4a8cf7d11b0027017e39a6947 Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Wed, 14 Dec 2022 18:28:36 +0100 Subject: [PATCH] [PATCH 1008/1017] add llvm_cpu to the long device name Gbp-Pq: Name 1008-add-llvm_cpu-to-the-long-device-name.patch --- lib/CL/devices/cpuinfo.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/CL/devices/cpuinfo.c b/lib/CL/devices/cpuinfo.c index 6a91997..57397d7 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 -- 2.30.2