Changeset View
Changeset View
Standalone View
Standalone View
openmp/libomptarget/deviceRTLs/common/support.h
//===--------- support.h - OpenMP GPU support functions ---------- CUDA -*-===// | //===--------- support.h - OpenMP GPU support functions ---------- CUDA -*-===// | ||||
// | // | ||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||||
// See https://llvm.org/LICENSE.txt for license information. | // See https://llvm.org/LICENSE.txt for license information. | ||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// | // | ||||
// Wrapper to some functions natively supported by the GPU. | // Wrapper to some functions natively supported by the GPU. | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
#ifndef OMPTARGET_SUPPORT_H | #ifndef OMPTARGET_SUPPORT_H | ||||
#define OMPTARGET_SUPPORT_H | #define OMPTARGET_SUPPORT_H | ||||
#include "interface.h" | #include "interface.h" | ||||
Lint: Pre-merge checks: clang-tidy: error: 'interface.h' file not found [clang-diagnostic-error]
[[https://github. | |||||
#include "target_impl.h" | #include "target_impl.h" | ||||
//////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////// | ||||
// Execution Parameters | // Execution Parameters | ||||
//////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////// | ||||
enum ExecutionMode { | enum ExecutionMode { | ||||
Spmd = 0x00u, | Spmd = 0x00u, | ||||
Generic = 0x01u, | Generic = 0x01u, | ||||
Show All 20 Lines | |||||
int GetMasterThreadID(); | int GetMasterThreadID(); | ||||
int GetNumberOfWorkersInTeam(); | int GetNumberOfWorkersInTeam(); | ||||
// get OpenMP thread and team ids | // get OpenMP thread and team ids | ||||
int GetOmpThreadId(); // omp_thread_num | int GetOmpThreadId(); // omp_thread_num | ||||
int GetOmpTeamId(); // omp_team_num | int GetOmpTeamId(); // omp_team_num | ||||
// get OpenMP number of threads and team | // get OpenMP number of threads and team | ||||
int GetNumberOfOmpThreads(bool isSPMDExecutionMode); // omp_num_threads | NOINLINE int GetNumberOfOmpThreads(bool isSPMDExecutionMode); // omp_num_threads | ||||
Lint: Pre-merge checks clang-tidy: warning: invalid case style for function 'GetNumberOfOmpThreads' [readability-identifier-naming] Lint: Pre-merge checks: clang-tidy: warning: invalid case style for function 'GetNumberOfOmpThreads' [readability… | |||||
JonChesterfieldUnsubmitted Not Done ReplyInline ActionsNoinline seems bad. Why? Also looks like the functions tagged noinline here are different to the ones that are renamed. JonChesterfield: Noinline seems bad. Why? Also looks like the functions tagged noinline here are different to… | |||||
int GetNumberOfOmpTeams(); // omp_num_teams | NOINLINE int GetNumberOfOmpTeams(); // omp_num_teams | ||||
Lint: Pre-merge checks clang-tidy: warning: invalid case style for function 'GetNumberOfOmpTeams' [readability-identifier-naming] Lint: Pre-merge checks: clang-tidy: warning: invalid case style for function 'GetNumberOfOmpTeams' [readability… | |||||
// get OpenMP number of procs | // get OpenMP number of procs | ||||
int GetNumberOfProcsInTeam(bool isSPMDExecutionMode); | int GetNumberOfProcsInTeam(bool isSPMDExecutionMode); | ||||
int GetNumberOfProcsInDevice(bool isSPMDExecutionMode); | int GetNumberOfProcsInDevice(bool isSPMDExecutionMode); | ||||
// masters | // masters | ||||
int IsTeamMaster(int ompThreadId); | int IsTeamMaster(int ompThreadId); | ||||
Show All 30 Lines |
clang-tidy: error: 'interface.h' file not found [clang-diagnostic-error]
not useful