[Libclc-dev] [PATCH 1/1] r600: Use llvm intrinsic to read work dimension information
Jeroen Ketema
j.ketema at imperial.ac.uk
Wed Jul 30 16:31:31 PDT 2014
On 31 Jul 2014, at 00:11, Jan Vesely <jan.vesely at rutgers.edu> wrote:
> Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> ---
> generic/include/clc/workitem/get_work_dim.h | 1 +
> r600/lib/SOURCES | 1 +
> r600/lib/workitem/get_work_dim.ll | 6 ++++++
> 3 files changed, 8 insertions(+)
> create mode 100644 generic/include/clc/workitem/get_work_dim.h
> create mode 100644 r600/lib/workitem/get_work_dim.ll
>
> diff --git a/generic/include/clc/workitem/get_work_dim.h b/generic/include/clc/workitem/get_work_dim.h
> new file mode 100644
> index 0000000..b4251e4
> --- /dev/null
> +++ b/generic/include/clc/workitem/get_work_dim.h
> @@ -0,0 +1 @@
> +_CLC_DECL uint get_num_groups();
surely this must be uint get_work_dim();
Jeroen
> diff --git a/r600/lib/SOURCES b/r600/lib/SOURCES
> index d9fc897..1677102 100644
> --- a/r600/lib/SOURCES
> +++ b/r600/lib/SOURCES
> @@ -5,6 +5,7 @@ workitem/get_group_id.ll
> workitem/get_local_size.ll
> workitem/get_local_id.ll
> workitem/get_global_size.ll
> +workitem/get_work_dim.ll
> synchronization/barrier.cl
> synchronization/barrier_impl.ll
> shared/vload.cl
> diff --git a/r600/lib/workitem/get_work_dim.ll b/r600/lib/workitem/get_work_dim.ll
> new file mode 100644
> index 0000000..aefdabd
> --- /dev/null
> +++ b/r600/lib/workitem/get_work_dim.ll
> @@ -0,0 +1,6 @@
> +declare i32 @llvm.r600.read.workdim() nounwind readnone
> +
> +define i32 @get_work_dim() nounwind readnone alwaysinline {
> + %x = call i32 @llvm.r600.read.workdim() nounwind readnone
> + ret i32 %x
> +}
> --
> 1.9.3
>
>
> _______________________________________________
> Libclc-dev mailing list
> Libclc-dev at pcc.me.uk
> http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev
More information about the Libclc-dev
mailing list