| 45 | #include <yateto.h> |
| 46 | |
| 47 | void seissol::initializer::InternalState::deriveLayerLayout( unsigned int i_numberOfClusters, |
| 48 | unsigned int *i_numberOfRegions, |
| 49 | unsigned int **i_numberOfRegionCells, |
| 50 | const struct CellLocalInformation *i_cellLocalInformation, |
| 51 | unsigned int **o_numberOfBuffers, |
| 52 | unsigned int **o_numberOfDerivatives ) { |
| 53 | unsigned int l_firstRegionCell = 0; |
| 54 | |
| 55 | for( unsigned int l_cluster = 0; l_cluster < i_numberOfClusters; l_cluster++ ) { |
| 56 | // iterate over all regions |
| 57 | for( unsigned int l_region = 0; l_region < i_numberOfRegions[l_cluster]; l_region++ ) { |
| 58 | // reset values |
| 59 | o_numberOfBuffers[l_cluster][l_region] = 0; o_numberOfDerivatives[l_cluster][l_region] = 0; |
| 60 | |
| 61 | unsigned int l_firstNonRegionCell = l_firstRegionCell + |
| 62 | i_numberOfRegionCells[l_cluster][l_region]; |
| 63 | |
| 64 | for( unsigned int l_cell = l_firstRegionCell; l_cell < l_firstNonRegionCell; l_cell++ ) { |
| 65 | if( (i_cellLocalInformation[l_cell].ltsSetup >> 8 ) % 2 == 1 ) o_numberOfBuffers[l_cluster][l_region]++; |
| 66 | if( (i_cellLocalInformation[l_cell].ltsSetup >> 9 ) % 2 == 1 ) o_numberOfDerivatives[l_cluster][l_region]++; |
| 67 | } |
| 68 | |
| 69 | l_firstRegionCell = l_firstNonRegionCell; |
| 70 | } |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | void seissol::initializer::InternalState::deriveInteriorLayout( unsigned int i_numberOfClusters, |
| 75 | unsigned int *i_numberOfInteriorCells, |
nothing calls this directly
no outgoing calls
no test coverage detected