Debian Codegraph @

libclc/opencl/lib/r600/image/get_image_dim.cl

raw
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include <clc/opencl/opencl-base.h>
10
11 _CLC_OVERLOAD _CLC_DEF int2 get_image_dim(image2d_t image) {
12 return (int2)(get_image_width(image), get_image_height(image));
13 }
14 _CLC_OVERLOAD _CLC_DEF int4 get_image_dim(image3d_t image) {
15 return (int4)(get_image_width(image), get_image_height(image),
16 get_image_depth(image), 0);
17 }