kmp_cancel.cpp (345231) | kmp_cancel.cpp (353358) |
---|---|
1 2//===----------------------------------------------------------------------===// 3// | 1 2//===----------------------------------------------------------------------===// 3// |
4// The LLVM Compiler Infrastructure | 4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5// See https://llvm.org/LICENSE.txt for license information. 6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
5// | 7// |
6// This file is dual licensed under the MIT and the University of Illinois Open 7// Source Licenses. See LICENSE.txt for details. 8// | |
9//===----------------------------------------------------------------------===// 10 11#include "kmp.h" 12#include "kmp_i18n.h" 13#include "kmp_io.h" 14#include "kmp_str.h" 15#if OMPT_SUPPORT 16#include "ompt-specific.h" 17#endif 18 | 8//===----------------------------------------------------------------------===// 9 10#include "kmp.h" 11#include "kmp_i18n.h" 12#include "kmp_io.h" 13#include "kmp_str.h" 14#if OMPT_SUPPORT 15#include "ompt-specific.h" 16#endif 17 |
19#if OMP_40_ENABLED 20 | |
21/*! 22@ingroup CANCELLATION 23@param loc_ref location of the original task directive 24@param gtid Global thread ID of encountering thread 25@param cncl_kind Cancellation kind (parallel, for, sections, taskgroup) 26 27@return returns true if the cancellation request has been activated and the 28execution thread needs to proceed to the end of the canceled region. --- 38 unchanged lines hidden (view full) --- 67 else if (cncl_kind == cancel_loop) 68 type = ompt_cancel_loop; 69 else if (cncl_kind == cancel_sections) 70 type = ompt_cancel_sections; 71 ompt_callbacks.ompt_callback(ompt_callback_cancel)( 72 task_data, type | ompt_cancel_activated, 73 OMPT_GET_RETURN_ADDRESS(0)); 74 } | 18/*! 19@ingroup CANCELLATION 20@param loc_ref location of the original task directive 21@param gtid Global thread ID of encountering thread 22@param cncl_kind Cancellation kind (parallel, for, sections, taskgroup) 23 24@return returns true if the cancellation request has been activated and the 25execution thread needs to proceed to the end of the canceled region. --- 38 unchanged lines hidden (view full) --- 64 else if (cncl_kind == cancel_loop) 65 type = ompt_cancel_loop; 66 else if (cncl_kind == cancel_sections) 67 type = ompt_cancel_sections; 68 ompt_callbacks.ompt_callback(ompt_callback_cancel)( 69 task_data, type | ompt_cancel_activated, 70 OMPT_GET_RETURN_ADDRESS(0)); 71 } |
75#endif | 72#endif // OMPT_SUPPORT && OMPT_OPTIONAL |
76 return 1 /* true */; 77 } 78 break; 79 } 80 case cancel_taskgroup: 81 // cancellation requests for a task group 82 // are handled through the taskgroup structure 83 { --- 243 unchanged lines hidden (view full) --- 327 taskgroup = task->td_taskgroup; 328 return taskgroup && taskgroup->cancel_request; 329 } 330 } 331 } 332 333 return 0 /* false */; 334} | 73 return 1 /* true */; 74 } 75 break; 76 } 77 case cancel_taskgroup: 78 // cancellation requests for a task group 79 // are handled through the taskgroup structure 80 { --- 243 unchanged lines hidden (view full) --- 324 taskgroup = task->td_taskgroup; 325 return taskgroup && taskgroup->cancel_request; 326 } 327 } 328 } 329 330 return 0 /* false */; 331} |
335 336#endif | |