Author: Matt Arsenault
Date: 2026-03-05T23:55:56+01:00
New Revision: 11727c11f833873af97d3969483f488e5251f35d

URL: 
https://github.com/llvm/llvm-project/commit/11727c11f833873af97d3969483f488e5251f35d
DIFF: 
https://github.com/llvm/llvm-project/commit/11727c11f833873af97d3969483f488e5251f35d.diff

LOG: libclc: Implement get_enqueued_local_size (#184842)

Added: 
    libclc/clc/include/clc/workitem/clc_get_enqueued_local_size.h
    libclc/clc/lib/amdgcn/workitem/clc_get_enqueued_local_size.cl
    libclc/opencl/lib/generic/workitem/get_enqueued_local_size.cl

Modified: 
    libclc/clc/lib/amdgcn/SOURCES
    libclc/opencl/lib/generic/SOURCES

Removed: 
    


################################################################################
diff  --git a/libclc/clc/include/clc/workitem/clc_get_enqueued_local_size.h 
b/libclc/clc/include/clc/workitem/clc_get_enqueued_local_size.h
new file mode 100644
index 0000000000000..3a1137ef3998d
--- /dev/null
+++ b/libclc/clc/include/clc/workitem/clc_get_enqueued_local_size.h
@@ -0,0 +1,17 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef __CLC_WORKITEM_CLC_GET_ENQUEUED_LOCAL_SIZE_H__
+#define __CLC_WORKITEM_CLC_GET_ENQUEUED_LOCAL_SIZE_H__
+
+#include <clc/internal/clc.h>
+
+_CLC_OVERLOAD _CLC_CONST _CLC_DECL size_t
+__clc_get_enqueued_local_size(uint dim);
+
+#endif // __CLC_WORKITEM_CLC_GET_ENQUEUED_LOCAL_SIZE_H__

diff  --git a/libclc/clc/lib/amdgcn/SOURCES b/libclc/clc/lib/amdgcn/SOURCES
index b4557b0a26f70..7006f538d9270 100644
--- a/libclc/clc/lib/amdgcn/SOURCES
+++ b/libclc/clc/lib/amdgcn/SOURCES
@@ -2,6 +2,7 @@ address_space/qualifier.cl
 math/clc_ldexp.cl
 mem_fence/clc_mem_fence.cl
 synchronization/clc_work_group_barrier.cl
+workitem/clc_get_enqueued_local_size.cl
 workitem/clc_get_global_offset.cl
 workitem/clc_get_global_size.cl
 workitem/clc_get_group_id.cl

diff  --git a/libclc/clc/lib/amdgcn/workitem/clc_get_enqueued_local_size.cl 
b/libclc/clc/lib/amdgcn/workitem/clc_get_enqueued_local_size.cl
new file mode 100644
index 0000000000000..c7226241694b3
--- /dev/null
+++ b/libclc/clc/lib/amdgcn/workitem/clc_get_enqueued_local_size.cl
@@ -0,0 +1,14 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "clc/workitem/clc_get_enqueued_local_size.h"
+#include "clc/workitem/clc_get_local_size.h"
+
+_CLC_OVERLOAD _CLC_DEF size_t __clc_get_enqueued_local_size(uint dim) {
+  return __clc_get_local_size(dim);
+}

diff  --git a/libclc/opencl/lib/generic/SOURCES 
b/libclc/opencl/lib/generic/SOURCES
index bb5e8ab08a711..893312f405fd0 100644
--- a/libclc/opencl/lib/generic/SOURCES
+++ b/libclc/opencl/lib/generic/SOURCES
@@ -199,5 +199,6 @@ shared/max.cl
 shared/min.cl
 shared/vload.cl
 shared/vstore.cl
+workitem/get_enqueued_local_size.cl
 workitem/get_global_id.cl
 workitem/get_global_size.cl

diff  --git a/libclc/opencl/lib/generic/workitem/get_enqueued_local_size.cl 
b/libclc/opencl/lib/generic/workitem/get_enqueued_local_size.cl
new file mode 100644
index 0000000000000..416a3e9837cdc
--- /dev/null
+++ b/libclc/opencl/lib/generic/workitem/get_enqueued_local_size.cl
@@ -0,0 +1,14 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include <clc/opencl/opencl-base.h>
+#include <clc/workitem/clc_get_enqueued_local_size.h>
+
+_CLC_DEF _CLC_OVERLOAD size_t get_enqueued_local_size(uint dim) {
+  return __clc_get_enqueued_local_size(dim);
+}


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to