![]() |
1.1.2 (revision 1350)
|
00001 /* 00002 * This file is part of the Score-P software (http://www.score-p.org) 00003 * 00004 * Copyright (c) 2009-2013, 00005 * RWTH Aachen University, Germany 00006 * Gesellschaft fuer numerische Simulation mbH Braunschweig, Germany 00007 * Technische Universitaet Dresden, Germany 00008 * University of Oregon, Eugene, USA 00009 * Forschungszentrum Juelich GmbH, Germany 00010 * German Research School for Simulation Sciences GmbH, Juelich/Aachen, Germany 00011 * Technische Universitaet Muenchen, Germany 00012 * 00013 * See the COPYING file in the package base directory for details. 00014 * 00015 */ 00016 /**************************************************************************** 00017 ** SCALASCA http://www.scalasca.org/ ** 00018 ** KOJAK http://www.fz-juelich.de/jsc/kojak/ ** 00019 ***************************************************************************** 00020 ** Copyright (c) 1998-2009 ** 00021 ** Forschungszentrum Juelich, Juelich Supercomputing Centre ** 00022 ** ** 00023 ** See the file COPYRIGHT in the package base directory for details ** 00024 ****************************************************************************/ 00025 #ifndef POMP2_LIB_H 00026 #define POMP2_LIB_H 00027 00028 #ifdef _OPENMP 00029 #include <omp.h> 00030 #endif 00031 00032 #include <stddef.h> 00033 #include <stdint.h> 00034 00035 #ifdef __cplusplus 00036 extern "C" { 00037 #endif 00038 00046 /* Avoid warnings from Orcale Studio Compiler if nowait clauses are added 00047 * to reduction loops. Opari always inserts a barrier after such loops, so 00048 * the nowait is save.*/ 00049 #if defined( __SUNPRO_C ) 00050 #pragma error_messages (off, E_NOWAIT_REDUCTION_USE) 00051 #endif 00052 00054 typedef void* POMP2_Region_handle; 00055 typedef int64_t POMP2_Task_handle; 00056 00066 extern size_t 00067 POMP2_Get_num_regions( void ); 00068 00075 extern void 00076 POMP2_Init_regions( void ); 00077 00082 extern const char* 00083 POMP2_Get_opari2_version( void ); 00084 00089 extern POMP2_Task_handle 00090 POMP2_Get_new_task_handle( void ); 00091 00094 extern void 00095 POMP2_Finalize( void ); 00096 00099 extern void 00100 POMP2_Init( void ); 00101 00104 extern void 00105 POMP2_Off( void ); 00106 00109 extern void 00110 POMP2_On( void ); 00111 00116 extern void 00117 POMP2_Begin( POMP2_Region_handle* pomp2_handle, 00118 const char ctc_string[] ); 00119 00123 extern void 00124 POMP2_End( POMP2_Region_handle* pomp2_handle ); 00125 00131 extern void 00132 POMP2_Assign_handle( POMP2_Region_handle* pomp2_handle, 00133 const char ctc_string[] ); 00134 00135 #ifdef _OPENMP 00136 00141 extern void 00142 POMP2_Atomic_enter( POMP2_Region_handle* pomp2_handle, 00143 const char ctc_string[] ); 00144 00148 extern void 00149 POMP2_Atomic_exit( POMP2_Region_handle* pomp2_handle ); 00150 00163 extern void 00164 POMP2_Barrier_enter( POMP2_Region_handle* pomp2_handle, 00165 POMP2_Task_handle* pomp2_old_task, 00166 const char ctc_string[] ); 00167 00179 extern void 00180 POMP2_Barrier_exit( POMP2_Region_handle* pomp2_handle, 00181 POMP2_Task_handle pomp2_old_task ); 00182 00183 00195 extern void 00196 POMP2_Implicit_barrier_enter( POMP2_Region_handle* pomp2_handle, 00197 POMP2_Task_handle* pomp2_old_task ); 00198 00199 00211 extern void 00212 POMP2_Implicit_barrier_exit( POMP2_Region_handle* pomp2_handle, 00213 POMP2_Task_handle pomp2_old_task ); 00214 00215 00221 extern void 00222 POMP2_Flush_enter( POMP2_Region_handle* pomp2_handle, 00223 const char ctc_string[] ); 00224 00228 extern void 00229 POMP2_Flush_exit( POMP2_Region_handle* pomp2_handle ); 00230 00234 extern void 00235 POMP2_Critical_begin( POMP2_Region_handle* pomp2_handle ); 00236 00240 extern void 00241 POMP2_Critical_end( POMP2_Region_handle* pomp2_handle ); 00242 00247 extern void 00248 POMP2_Critical_enter( POMP2_Region_handle* pomp2_handle, 00249 const char ctc_string[] ); 00250 00254 extern void 00255 POMP2_Critical_exit( POMP2_Region_handle* pomp2_handle ); 00256 00261 extern void 00262 POMP2_For_enter( POMP2_Region_handle* pomp2_handle, 00263 const char ctc_string[] ); 00264 00268 extern void 00269 POMP2_For_exit( POMP2_Region_handle* pomp2_handle ); 00270 00275 extern void 00276 POMP2_Master_begin( POMP2_Region_handle* pomp2_handle, 00277 const char ctc_string[] ); 00278 00282 extern void 00283 POMP2_Master_end( POMP2_Region_handle* pomp2_handle ); 00284 00294 extern void 00295 POMP2_Parallel_begin( POMP2_Region_handle* pomp2_handle ); 00296 00301 extern void 00302 POMP2_Parallel_end( POMP2_Region_handle* pomp2_handle ); 00303 00318 extern void 00319 POMP2_Parallel_fork( POMP2_Region_handle* pomp2_handle, 00320 int if_clause, 00321 int num_threads, 00322 POMP2_Task_handle* pomp2_old_task, 00323 const char ctc_string[] ); 00324 00336 extern void 00337 POMP2_Parallel_join( POMP2_Region_handle* pomp2_handle, 00338 POMP2_Task_handle pomp2_old_task ); 00339 00340 00345 extern void 00346 POMP2_Section_begin( POMP2_Region_handle* pomp2_handle, 00347 const char ctc_string[] ); 00348 00352 extern void 00353 POMP2_Section_end( POMP2_Region_handle* pomp2_handle ); 00354 00359 extern void 00360 POMP2_Sections_enter( POMP2_Region_handle* pomp2_handle, 00361 const char ctc_string[] ); 00362 00366 extern void 00367 POMP2_Sections_exit( POMP2_Region_handle* pomp2_handle ); 00368 00372 extern void 00373 POMP2_Single_begin( POMP2_Region_handle* pomp2_handle ); 00374 00378 extern void 00379 POMP2_Single_end( POMP2_Region_handle* pomp2_handle ); 00380 00386 extern void 00387 POMP2_Single_enter( POMP2_Region_handle* pomp2_handle, 00388 const char ctc_string[] ); 00389 00393 extern void 00394 POMP2_Single_exit( POMP2_Region_handle* pomp2_handle ); 00395 00401 extern void 00402 POMP2_Workshare_enter( POMP2_Region_handle* pomp2_handle, 00403 const char ctc_string[] ); 00404 00408 extern void 00409 POMP2_Workshare_exit( POMP2_Region_handle* pomp2_handle ); 00410 00414 extern void 00415 POMP2_Ordered_begin( POMP2_Region_handle* pomp2_handle ); 00416 00420 extern void 00421 POMP2_Ordered_end( POMP2_Region_handle* pomp2_handle ); 00422 00427 extern void 00428 POMP2_Ordered_enter( POMP2_Region_handle* pomp2_handle, 00429 const char ctc_string[] ); 00430 00434 extern void 00435 POMP2_Ordered_exit( POMP2_Region_handle* pomp2_handle ); 00436 00452 extern void 00453 POMP2_Task_create_begin( POMP2_Region_handle* pomp2_handle, 00454 POMP2_Task_handle* pomp2_new_task, 00455 POMP2_Task_handle* pomp2_old_task, 00456 int pomp2_if, 00457 const char ctc_string[] ); 00458 00468 extern void 00469 POMP2_Task_create_end( POMP2_Region_handle* pomp2_handle, 00470 POMP2_Task_handle pomp2_old_task ); 00471 00477 extern void 00478 POMP2_Task_begin( POMP2_Region_handle* pomp2_handle, 00479 POMP2_Task_handle pomp2_task ); 00480 00485 extern void 00486 POMP2_Task_end( POMP2_Region_handle* pomp2_handle ); 00487 00505 extern void 00506 POMP2_Untied_task_create_begin( POMP2_Region_handle* pomp2_handle, 00507 POMP2_Task_handle* pomp2_new_task, 00508 POMP2_Task_handle* pomp2_old_task, 00509 int pomp2_if, 00510 const char ctc_string[] ); 00511 00523 extern void 00524 POMP2_Untied_task_create_end( POMP2_Region_handle* pomp2_handle, 00525 POMP2_Task_handle pomp2_old_task ); 00526 00533 void 00534 POMP2_Untied_task_begin( POMP2_Region_handle* pomp2_handle, 00535 POMP2_Task_handle pomp2_task ); 00536 00541 extern void 00542 POMP2_Untied_task_end( POMP2_Region_handle* pomp2_handle ); 00543 00558 extern void 00559 POMP2_Taskwait_begin( POMP2_Region_handle* pomp2_handle, 00560 POMP2_Task_handle* pomp2_old_task, 00561 const char ctc_string[] ); 00562 00575 extern void 00576 POMP2_Taskwait_end( POMP2_Region_handle* pomp2_handle, 00577 POMP2_Task_handle pomp2_old_task ); 00578 00586 extern int 00587 POMP2_Lib_get_max_threads( void ); 00588 00591 extern void 00592 POMP2_Init_lock( omp_lock_t* s ); 00593 00596 extern void 00597 POMP2_Destroy_lock( omp_lock_t* s ); 00598 00601 extern void 00602 POMP2_Set_lock( omp_lock_t* s ); 00603 00606 extern void 00607 POMP2_Unset_lock( omp_lock_t* s ); 00608 00612 extern int 00613 POMP2_Test_lock( omp_lock_t* s ); 00614 00617 extern void 00618 POMP2_Init_nest_lock( omp_nest_lock_t* s ); 00619 00622 extern void 00623 POMP2_Destroy_nest_lock( omp_nest_lock_t* s ); 00624 00627 extern void 00628 POMP2_Set_nest_lock( omp_nest_lock_t* s ); 00629 00632 extern void 00633 POMP2_Unset_nest_lock( omp_nest_lock_t* s ); 00634 00638 extern int 00639 POMP2_Test_nest_lock( omp_nest_lock_t* s ); 00640 00641 #endif /* _OPENMP */ 00642 00643 #ifdef __cplusplus 00644 } 00645 #endif 00646 00647 #endif