![]() |
1.0.7 (revision 953)
|
00001 /* 00002 * This file is part of the Score-P software (http://www.score-p.org) 00003 * 00004 * Copyright (c) 2009-2011, 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 00052 typedef void* POMP2_Region_handle; 00053 typedef int64_t POMP2_Task_handle; 00054 00064 extern size_t 00065 POMP2_Get_num_regions(); 00066 00073 extern void 00074 POMP2_Init_regions(); 00075 00080 extern const char* 00081 POMP2_Get_opari2_version(); 00082 00087 extern POMP2_Task_handle 00088 POMP2_Get_new_task_handle(); 00089 00092 extern void 00093 POMP2_Finalize(); 00094 00097 extern void 00098 POMP2_Init(); 00099 00102 extern void 00103 POMP2_Off(); 00104 00107 extern void 00108 POMP2_On(); 00109 00113 extern void 00114 POMP2_Begin( POMP2_Region_handle* pomp2_handle ); 00115 00119 extern void 00120 POMP2_End( POMP2_Region_handle* pomp2_handle ); 00121 00127 extern void 00128 POMP2_Assign_handle( POMP2_Region_handle* pomp2_handle, 00129 const char ctc_string[] ); 00130 00131 #ifdef _OPENMP 00132 00137 extern void 00138 POMP2_Atomic_enter( POMP2_Region_handle* pomp2_handle, 00139 const char ctc_string[] ); 00140 00144 extern void 00145 POMP2_Atomic_exit( POMP2_Region_handle* pomp2_handle ); 00146 00159 extern void 00160 POMP2_Barrier_enter( POMP2_Region_handle* pomp2_handle, 00161 POMP2_Task_handle* pomp2_old_task, 00162 const char ctc_string[] ); 00163 00175 extern void 00176 POMP2_Barrier_exit( POMP2_Region_handle* pomp2_handle, 00177 POMP2_Task_handle pomp2_old_task ); 00178 00179 00191 extern void 00192 POMP2_Implicit_barrier_enter( POMP2_Region_handle* pomp2_handle, 00193 POMP2_Task_handle* pomp2_old_task ); 00194 00195 00207 extern void 00208 POMP2_Implicit_barrier_exit( POMP2_Region_handle* pomp2_handle, 00209 POMP2_Task_handle pomp2_old_task ); 00210 00211 00217 extern void 00218 POMP2_Flush_enter( POMP2_Region_handle* pomp2_handle, 00219 const char ctc_string[] ); 00220 00224 extern void 00225 POMP2_Flush_exit( POMP2_Region_handle* pomp2_handle ); 00226 00230 extern void 00231 POMP2_Critical_begin( POMP2_Region_handle* pomp2_handle ); 00232 00236 extern void 00237 POMP2_Critical_end( POMP2_Region_handle* pomp2_handle ); 00238 00243 extern void 00244 POMP2_Critical_enter( POMP2_Region_handle* pomp2_handle, 00245 const char ctc_string[] ); 00246 00250 extern void 00251 POMP2_Critical_exit( POMP2_Region_handle* pomp2_handle ); 00252 00257 extern void 00258 POMP2_For_enter( POMP2_Region_handle* pomp2_handle, 00259 const char ctc_string[] ); 00260 00264 extern void 00265 POMP2_For_exit( POMP2_Region_handle* pomp2_handle ); 00266 00271 extern void 00272 POMP2_Master_begin( POMP2_Region_handle* pomp2_handle, 00273 const char ctc_string[] ); 00274 00278 extern void 00279 POMP2_Master_end( POMP2_Region_handle* pomp2_handle ); 00280 00290 extern void 00291 POMP2_Parallel_begin( POMP2_Region_handle* pomp2_handle ); 00292 00297 extern void 00298 POMP2_Parallel_end( POMP2_Region_handle* pomp2_handle ); 00299 00314 extern void 00315 POMP2_Parallel_fork( POMP2_Region_handle* pomp2_handle, 00316 int if_clause, 00317 int num_threads, 00318 POMP2_Task_handle* pomp2_old_task, 00319 const char ctc_string[] ); 00320 00332 extern void 00333 POMP2_Parallel_join( POMP2_Region_handle* pomp2_handle, 00334 POMP2_Task_handle pomp2_old_task ); 00335 00336 00341 extern void 00342 POMP2_Section_begin( POMP2_Region_handle* pomp2_handle, 00343 const char ctc_string[] ); 00344 00348 extern void 00349 POMP2_Section_end( POMP2_Region_handle* pomp2_handle ); 00350 00355 extern void 00356 POMP2_Sections_enter( POMP2_Region_handle* pomp2_handle, 00357 const char ctc_string[] ); 00358 00362 extern void 00363 POMP2_Sections_exit( POMP2_Region_handle* pomp2_handle ); 00364 00368 extern void 00369 POMP2_Single_begin( POMP2_Region_handle* pomp2_handle ); 00370 00374 extern void 00375 POMP2_Single_end( POMP2_Region_handle* pomp2_handle ); 00376 00382 extern void 00383 POMP2_Single_enter( POMP2_Region_handle* pomp2_handle, 00384 const char ctc_string[] ); 00385 00389 extern void 00390 POMP2_Single_exit( POMP2_Region_handle* pomp2_handle ); 00391 00397 extern void 00398 POMP2_Workshare_enter( POMP2_Region_handle* pomp2_handle, 00399 const char ctc_string[] ); 00400 00404 extern void 00405 POMP2_Workshare_exit( POMP2_Region_handle* pomp2_handle ); 00406 00410 extern void 00411 POMP2_Ordered_begin( POMP2_Region_handle* pomp2_handle ); 00412 00416 extern void 00417 POMP2_Ordered_end( POMP2_Region_handle* pomp2_handle ); 00418 00423 extern void 00424 POMP2_Ordered_enter( POMP2_Region_handle* pomp2_handle, 00425 const char ctc_string[] ); 00426 00430 extern void 00431 POMP2_Ordered_exit( POMP2_Region_handle* pomp2_handle ); 00432 00448 extern void 00449 POMP2_Task_create_begin( POMP2_Region_handle* pomp2_handle, 00450 POMP2_Task_handle* pomp2_new_task, 00451 POMP2_Task_handle* pomp2_old_task, 00452 int pomp2_if, 00453 const char ctc_string[] ); 00454 00464 extern void 00465 POMP2_Task_create_end( POMP2_Region_handle* pomp2_handle, 00466 POMP2_Task_handle pomp2_old_task ); 00467 00473 extern void 00474 POMP2_Task_begin( POMP2_Region_handle* pomp2_handle, 00475 POMP2_Task_handle pomp2_task ); 00476 00481 extern void 00482 POMP2_Task_end( POMP2_Region_handle* pomp2_handle ); 00483 00501 extern void 00502 POMP2_Untied_task_create_begin( POMP2_Region_handle* pomp2_handle, 00503 POMP2_Task_handle* pomp2_new_task, 00504 POMP2_Task_handle* pomp2_old_task, 00505 int pomp2_if, 00506 const char ctc_string[] ); 00507 00519 extern void 00520 POMP2_Untied_task_create_end( POMP2_Region_handle* pomp2_handle, 00521 POMP2_Task_handle pomp2_old_task ); 00522 00529 void 00530 POMP2_Untied_task_begin( POMP2_Region_handle* pomp2_handle, 00531 POMP2_Task_handle pomp2_task ); 00532 00537 extern void 00538 POMP2_Untied_task_end( POMP2_Region_handle* pomp2_handle ); 00539 00554 extern void 00555 POMP2_Taskwait_begin( POMP2_Region_handle* pomp2_handle, 00556 POMP2_Task_handle* pomp2_old_task, 00557 const char ctc_string[] ); 00558 00571 extern void 00572 POMP2_Taskwait_end( POMP2_Region_handle* pomp2_handle, 00573 POMP2_Task_handle pomp2_old_task ); 00574 00582 extern int 00583 POMP2_Lib_get_max_threads(); 00584 00587 extern void 00588 POMP2_Init_lock( omp_lock_t* s ); 00589 00592 extern void 00593 POMP2_Destroy_lock( omp_lock_t* s ); 00594 00597 extern void 00598 POMP2_Set_lock( omp_lock_t* s ); 00599 00602 extern void 00603 POMP2_Unset_lock( omp_lock_t* s ); 00604 00608 extern int 00609 POMP2_Test_lock( omp_lock_t* s ); 00610 00613 extern void 00614 POMP2_Init_nest_lock( omp_nest_lock_t* s ); 00615 00618 extern void 00619 POMP2_Destroy_nest_lock( omp_nest_lock_t* s ); 00620 00623 extern void 00624 POMP2_Set_nest_lock( omp_nest_lock_t* s ); 00625 00628 extern void 00629 POMP2_Unset_nest_lock( omp_nest_lock_t* s ); 00630 00634 extern int 00635 POMP2_Test_nest_lock( omp_nest_lock_t* s ); 00636 00637 #endif /* _OPENMP */ 00638 00639 #ifdef __cplusplus 00640 } 00641 #endif 00642 00643 #endif