18 lines · plain
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-exception6//7//===----------------------------------------------------------------------===//8 9#include <clc/workitem/clc_get_global_id.h>10#include <clc/workitem/clc_get_group_id.h>11#include <clc/workitem/clc_get_local_id.h>12#include <clc/workitem/clc_get_local_size.h>13 14_CLC_OVERLOAD _CLC_DEF size_t __clc_get_global_id(uint dim) {15 return __clc_get_group_id(dim) * __clc_get_local_size(dim) +16 __clc_get_local_id(dim);17}18