![]() |
1.0-beta (revision 492)
|
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 00063 extern size_t 00064 POMP2_Get_num_regions(); 00065 00072 extern void 00073 POMP2_Init_regions(); 00074 00078 extern const char* 00079 POMP2_Get_opari2_version(); 00080 00083 extern POMP2_Task_handle 00084 POMP2_Get_new_task_handle(); 00085 00088 extern void 00089 POMP2_Finalize(); 00090 00093 extern void 00094 POMP2_Init(); 00095 00098 extern void 00099 POMP2_Off(); 00100 00103 extern void 00104 POMP2_On(); 00105 00109 extern void 00110 POMP2_Begin( POMP2_Region_handle* pomp2_handle ); 00111 00115 extern void 00116 POMP2_End( POMP2_Region_handle* pomp2_handle ); 00117 00123 extern void 00124 POMP2_Assign_handle( POMP2_Region_handle* pomp2_handle, 00125 const char ctc_string[] ); 00126 00127 #ifdef _OPENMP 00128 00133 extern void 00134 POMP2_Atomic_enter( POMP2_Region_handle* pomp2_handle, 00135 const char ctc_string[] ); 00136 00140 extern void 00141 POMP2_Atomic_exit( POMP2_Region_handle* pomp2_handle ); 00142 00155 extern void 00156 POMP2_Barrier_enter( POMP2_Region_handle* pomp2_handle, 00157 POMP2_Task_handle* pomp2_old_task, 00158 const char ctc_string[] ); 00159 00171 extern void 00172 POMP2_Barrier_exit( POMP2_Region_handle* pomp2_handle, 00173 POMP2_Task_handle pomp2_old_task ); 00174 00175 00187 extern void 00188 POMP2_Implicit_barrier_enter( POMP2_Region_handle* pomp2_handle, 00189 POMP2_Task_handle* pomp2_old_task ); 00190 00191 00203 extern void 00204 POMP2_Implicit_barrier_exit( POMP2_Region_handle* pomp2_handle, 00205 POMP2_Task_handle pomp2_old_task ); 00206 00207 00213 extern void 00214 POMP2_Flush_enter( POMP2_Region_handle* pomp2_handle, 00215 const char ctc_string[] ); 00216 00220 extern void 00221 POMP2_Flush_exit( POMP2_Region_handle* pomp2_handle ); 00222 00226 extern void 00227 POMP2_Critical_begin( POMP2_Region_handle* pomp2_handle ); 00228 00232 extern void 00233 POMP2_Critical_end( POMP2_Region_handle* pomp2_handle ); 00234 00239 extern void 00240 POMP2_Critical_enter( POMP2_Region_handle* pomp2_handle, 00241 const char ctc_string[] ); 00242 00246 extern void 00247 POMP2_Critical_exit( POMP2_Region_handle* pomp2_handle ); 00248 00253 extern void 00254 POMP2_For_enter( POMP2_Region_handle* pomp2_handle, 00255 const char ctc_string[] ); 00256 00260 extern void 00261 POMP2_For_exit( POMP2_Region_handle* pomp2_handle ); 00262 00267 extern void 00268 POMP2_Master_begin( POMP2_Region_handle* pomp2_handle, 00269 const char ctc_string[] ); 00270 00274 extern void 00275 POMP2_Master_end( POMP2_Region_handle* pomp2_handle ); 00276 00286 extern void 00287 POMP2_Parallel_begin( POMP2_Region_handle* pomp2_handle ); 00288 00293 extern void 00294 POMP2_Parallel_end( POMP2_Region_handle* pomp2_handle ); 00295 00310 extern void 00311 POMP2_Parallel_fork( POMP2_Region_handle* pomp2_handle, 00312 int if_clause, 00313 int num_threads, 00314 POMP2_Task_handle* pomp2_old_task, 00315 const char ctc_string[] ); 00316 00328 extern void 00329 POMP2_Parallel_join( POMP2_Region_handle* pomp2_handle, 00330 POMP2_Task_handle pomp2_old_task ); 00331 00332 00337 extern void 00338 POMP2_Section_begin( POMP2_Region_handle* pomp2_handle, 00339 const char ctc_string[] ); 00340 00344 extern void 00345 POMP2_Section_end( POMP2_Region_handle* pomp2_handle ); 00346 00351 extern void 00352 POMP2_Sections_enter( POMP2_Region_handle* pomp2_handle, 00353 const char ctc_string[] ); 00354 00358 extern void 00359 POMP2_Sections_exit( POMP2_Region_handle* pomp2_handle ); 00360 00364 extern void 00365 POMP2_Single_begin( POMP2_Region_handle* pomp2_handle ); 00366 00370 extern void 00371 POMP2_Single_end( POMP2_Region_handle* pomp2_handle ); 00372 00378 extern void 00379 POMP2_Single_enter( POMP2_Region_handle* pomp2_handle, 00380 const char ctc_string[] ); 00381 00385 extern void 00386 POMP2_Single_exit( POMP2_Region_handle* pomp2_handle ); 00387 00393 extern void 00394 POMP2_Workshare_enter( POMP2_Region_handle* pomp2_handle, 00395 const char ctc_string[] ); 00396 00400 extern void 00401 POMP2_Workshare_exit( POMP2_Region_handle* pomp2_handle ); 00402 00406 extern void 00407 POMP2_Ordered_begin( POMP2_Region_handle* pomp2_handle ); 00408 00412 extern void 00413 POMP2_Ordered_end( POMP2_Region_handle* pomp2_handle ); 00414 00419 extern void 00420 POMP2_Ordered_enter( POMP2_Region_handle* pomp2_handle, 00421 const char ctc_string[] ); 00422 00426 extern void 00427 POMP2_Ordered_exit( POMP2_Region_handle* pomp2_handle ); 00428 00444 extern void 00445 POMP2_Task_create_begin( POMP2_Region_handle* pomp2_handle, 00446 POMP2_Task_handle* pomp2_old_task, 00447 int pomp2_if, 00448 const char ctc_string[] ); 00449 00459 extern void 00460 POMP2_Task_create_end( POMP2_Region_handle* pomp2_handle, 00461 POMP2_Task_handle pomp2_old_task ); 00462 00467 extern void 00468 POMP2_Task_begin( POMP2_Region_handle* pomp2_handle, 00469 POMP2_Task_handle pomp2_new_task ); 00470 00475 extern void 00476 POMP2_Task_end( POMP2_Region_handle* pomp2_handle ); 00477 00495 extern void 00496 POMP2_Untied_task_create_begin( POMP2_Region_handle* pomp2_handle, 00497 POMP2_Task_handle* pomp2_old_task, 00498 int pomp2_if, 00499 const char ctc_string[] ); 00500 00512 extern void 00513 POMP2_Untied_task_create_end( POMP2_Region_handle* pomp2_handle, 00514 POMP2_Task_handle pomp2_old_task ); 00515 00521 void 00522 POMP2_Untied_task_begin( POMP2_Region_handle* pomp2_handle, 00523 POMP2_Task_handle pomp2_new_task ); 00524 00529 extern void 00530 POMP2_Untied_task_end( POMP2_Region_handle* pomp2_handle ); 00531 00546 extern void 00547 POMP2_Taskwait_begin( POMP2_Region_handle* pomp2_handle, 00548 POMP2_Task_handle* pomp2_old_task, 00549 const char ctc_string[] ); 00550 00563 extern void 00564 POMP2_Taskwait_end( POMP2_Region_handle* pomp2_handle, 00565 POMP2_Task_handle pomp2_old_task ); 00566 00569 extern void 00570 POMP2_Init_lock( omp_lock_t* s ); 00571 00574 extern void 00575 POMP2_Destroy_lock( omp_lock_t* s ); 00576 00579 extern void 00580 POMP2_Set_lock( omp_lock_t* s ); 00581 00584 extern void 00585 POMP2_Unset_lock( omp_lock_t* s ); 00586 00589 extern int 00590 POMP2_Test_lock( omp_lock_t* s ); 00591 00594 extern void 00595 POMP2_Init_nest_lock( omp_nest_lock_t* s ); 00596 00599 extern void 00600 POMP2_Destroy_nest_lock( omp_nest_lock_t* s ); 00601 00604 extern void 00605 POMP2_Set_nest_lock( omp_nest_lock_t* s ); 00606 00609 extern void 00610 POMP2_Unset_nest_lock( omp_nest_lock_t* s ); 00611 00614 extern int 00615 POMP2_Test_nest_lock( omp_nest_lock_t* s ); 00616 00617 #endif /* _OPENMP */ 00618 00619 #ifdef __cplusplus 00620 } 00621 #endif 00622 00623 #endif