LCOV - code coverage report
Current view: top level - src/common - callgraph.F (source / functions) Coverage Total Hit
Test: CP2K Regtests (git:42dac4a) Lines: 90.0 % 10 9
Test Date: 2025-07-25 12:55:17 Functions: 47.4 % 19 9

            Line data    Source code
       1              : !--------------------------------------------------------------------------------------------------!
       2              : !   CP2K: A general program to perform molecular dynamics simulations                              !
       3              : !   Copyright 2000-2025 CP2K developers group <https://cp2k.org>                                   !
       4              : !                                                                                                  !
       5              : !   SPDX-License-Identifier: GPL-2.0-or-later                                                      !
       6              : !--------------------------------------------------------------------------------------------------!
       7              : MODULE callgraph
       8              :    USE kinds, ONLY: int_4, int_8
       9              :    USE timings_base_type, ONLY: call_stat_type
      10              : #include "../base/base_uses.f90"
      11              : 
      12              :    IMPLICIT NONE
      13              :    PRIVATE
      14              : 
      15              :    #:include 'hash_map.fypp'
      16              : 
      17   2426195782 :    #:call hash_map(prefix='callgraph', &
      18              :       key_type='INTEGER(kind=int_4), DIMENSION(2)', &
      19              :       value_type='TYPE(call_stat_type), POINTER', &
      20              :       key_default_init=' = 0_int_4', &
      21              :       value_default_init=' => NULL()')
      22              :    #:endcall hash_map
      23              : 
      24              : ! **************************************************************************************************
      25              : !> \brief ...
      26              : !> \param key ...
      27              : !> \return ...
      28              : ! **************************************************************************************************
      29   1610624043 :    PURE FUNCTION callgraph_hash_function(key) RESULT(hash)
      30              :       INTEGER(kind=int_4), DIMENSION(2), INTENT(in)      :: key
      31              :       INTEGER(KIND=int_8)                                :: hash
      32              : 
      33              :       INTEGER(kind=int_8)                                :: k1, k2
      34   1610624043 :       k1 = key(1) ! cast to int_8
      35   1610624043 :       k2 = key(2)
      36   1610624043 :       hash = IOR(k1, ISHFT(k2, 32))
      37   1610624043 :    END FUNCTION callgraph_hash_function
      38              : 
      39              : ! **************************************************************************************************
      40              : !> \brief ...
      41              : !> \param key ...
      42              : !> \return ...
      43              : ! **************************************************************************************************
      44   1596965627 :    PURE FUNCTION callgraph_keys_equal(key1, key2) RESULT(res)
      45              :       INTEGER(kind=int_4), DIMENSION(2), INTENT(in)      :: key1, key2
      46              :       LOGICAL                                            :: res
      47              : 
      48   4790896881 :       res = ALL(key1 == key2)
      49   1596965627 :    END FUNCTION callgraph_keys_equal
      50              : 
      51            0 : END MODULE callgraph
        

Generated by: LCOV version 2.0-1