Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:50

0001 /*
0002     Copyright (c) 2005-2020 Intel Corporation
0003 
0004     Licensed under the Apache License, Version 2.0 (the "License");
0005     you may not use this file except in compliance with the License.
0006     You may obtain a copy of the License at
0007 
0008         http://www.apache.org/licenses/LICENSE-2.0
0009 
0010     Unless required by applicable law or agreed to in writing, software
0011     distributed under the License is distributed on an "AS IS" BASIS,
0012     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013     See the License for the specific language governing permissions and
0014     limitations under the License.
0015 */
0016 
0017 #ifndef _FGT_TBB_TRACE_IMPL_H
0018 #define _FGT_TBB_TRACE_IMPL_H
0019 
0020 #include "../tbb_profiling.h"
0021 
0022 namespace tbb {
0023     namespace internal {
0024 
0025 #if TBB_PREVIEW_ALGORITHM_TRACE
0026         static inline void fgt_algorithm( string_index t, void *algorithm, void *parent ) {
0027             itt_make_task_group( ITT_DOMAIN_FLOW, algorithm, ALGORITHM, parent, ALGORITHM, t );
0028         }
0029         static inline void fgt_begin_algorithm( string_index t, void *algorithm ) {
0030             itt_task_begin( ITT_DOMAIN_FLOW, algorithm, ALGORITHM, NULL, FLOW_NULL, t );
0031         }
0032         static inline void fgt_end_algorithm( void * ) {
0033             itt_task_end( ITT_DOMAIN_FLOW );
0034         }
0035         static inline void fgt_alg_begin_body( string_index t, void *body, void *algorithm ) {
0036             itt_task_begin( ITT_DOMAIN_FLOW, body, FLOW_BODY, algorithm, ALGORITHM, t );
0037         }
0038         static inline void fgt_alg_end_body( void * ) {
0039             itt_task_end( ITT_DOMAIN_FLOW );
0040         }
0041 
0042 #else // TBB_PREVIEW_ALGORITHM_TRACE
0043 
0044         static inline void fgt_algorithm( string_index /*t*/, void * /*algorithm*/, void * /*parent*/ ) { }
0045         static inline void fgt_begin_algorithm( string_index /*t*/, void * /*algorithm*/ ) { }
0046         static inline void fgt_end_algorithm( void * ) { }
0047         static inline void fgt_alg_begin_body( string_index /*t*/, void * /*body*/, void * /*algorithm*/ ) { }
0048         static inline void fgt_alg_end_body( void * ) { }
0049 
0050 #endif // TBB_PREVIEW_ALGORITHM_TRACEE
0051 
0052     } // namespace internal
0053 } // namespace tbb
0054 
0055 #endif