Compare commits

...

4 commits

10 changed files with 2539 additions and 1610 deletions

158
docs/templates/Template.F90 vendored Normal file
View file

@ -0,0 +1,158 @@
!*================================================================================================*!
!| |!
!| /$$$$$$$ /$$ /$$ /$$ /$$ |!
!| | $$__ $$|__/ | $$ /$ | $$| $$ |!
!| | $$ \ $$ /$$ /$$$$$$ | $$ /$$$| $$| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ |!
!| | $$$$$$$ | $$ /$$__ $$ | $$/$$ $$ $$| $$__ $$ /$$__ $$ /$$__ $$ /$$__ $$ |!
!| | $$__ $$| $$| $$ \ $$ | $$$$_ $$$$| $$ \ $$| $$ \ $$| $$ \ $$| $$ \ $$ |!
!| | $$ \ $$| $$| $$ | $$ | $$$/ \ $$$| $$ | $$| $$ | $$| $$ | $$| $$ | $$ |!
!| | $$$$$$$/| $$| $$$$$$$ | $$/ \ $$| $$ | $$| $$$$$$/| $$$$$$/| $$$$$$$/ |!
!| |_______/ |__/ \____ $$ |__/ \__/|__/ |__/ \______/ \______/ | $$____/ |!
!| /$$ \ $$ | $$ |!
!| | $$$$$$/ | $$ |!
!| \______/ |__/ |!
!| |!
!| DESCRIPTION: |!
!| ------------ |!
!| |!
!| DESCRIPTION NEEDED. |!
!| | | |!
!| |!
!| -------------------------------------------------------------------------------------------- |!
!| Copyright (c) 2023, High Performance Computing Center - University of Stuttgart |!
!| |!
!| Redistribution and use in source and binary forms, with or without modification, are |!
!| permitted provided that the following conditions are met: |!
!| |!
!| (1) Redistributions of source code must retain the above copyright notice, this list of |!
!| conditions and the following disclaimer. |!
!| |!
!| (2) Redistributions in binary form must reproduce the above copyright notice, this list |!
!| of conditions and the following disclaimer in the documentation and/or other |!
!| materials provided with the distribution. |!
!| |!
!| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS |!
!| OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |!
!| MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |!
!| COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |!
!| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |!
!| SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |!
!| HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |!
!| TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |!
!| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |!
!| |!
!*================================================================================================*!
module MODULE_FILE
!*-----------------------*!
! DEFINE INT VARIABLES: !
!*-----------------------*!
!*-----------------------*!
! DEFINE FLOAT VARIABLES: !
!*-----------------------*!
!*-----------------------*!
! DEFINE CHAR VARIABLES: !
!*-----------------------*!
!*-----------------------*!
! DEFINE STRUCTS: !
!*-----------------------*!
!*--------------------------------------------------------*!
! COMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENT !
!*--------------------------------------------------------*!
!************************************************************************************************!
!| _ _ _ ____ _ _ _ ___ ____ |!
!| | |\ | | | | | | \ |___ |!
!| | | \| |___ |___ |__| |__/ |___ |!
!| |!
!************************************************************************************************!
!************************************************************************************************!
!| ___ ____ _ _ _ _ ___ _ _ _ ____ ___ _ _ ___ ____ ____ |!
!| |__] |__/ | |\/| | | | | | |___ | \_/ |__] |___ [__ |!
!| | | \ | | | | | | \/ |___ | | | |___ ___] |!
!| |!
!************************************************************************************************!
!************************************************************************************************!
!| _ _ ____ ____ ____ ____ ____ |!
!| |\/| |__| | |__/ | | [__ |!
!| | | | | |___ | \ |__| ___] |!
!| |!
!************************************************************************************************!
!************************************************************************************************!
!| ____ ____ _ _ ____ ___ ____ _ _ ___ ____ |!
!| | | | |\ | [__ | |__| |\ | | [__ |!
!| |___ |__| | \| ___] | | | | \| | ___] |!
!| |!
!************************************************************************************************!
!************************************************************************************************!
!| ____ _ _ ___ ____ ____ _ _ ____ _ _ _ ____ ____ _ ____ ___ _ ____ ____ |!
!| |___ \/ | |___ |__/ |\ | |__| | | | |__| |__/ | |__| |__] | |___ [__ |!
!| |___ _/\_ | |___ | \ | \| | | |___ \/ | | | \ | | | |__] |___ |___ ___] |!
!| |!
!************************************************************************************************!
!************************************************************************************************!
!| ____ _ _ ___ ____ ____ _ _ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ |!
!| |___ \/ | |___ |__/ |\ | |__| | | | | |\ | [__ | |__| |\ | | [__ |!
!| |___ _/\_ | |___ | \ | \| | | |___ |___ |__| | \| ___] | | | | \| | ___] |!
!| |!
!************************************************************************************************!
!************************************************************************************************!
!| ____ _ ____ ___ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ |!
!| | __ | | | |__] |__| | | | | |\ | [__ | |__| |\ | | [__ |!
!| |__] |___ |__| |__] | | |___ |___ |__| | \| ___] | | | | \| | ___] |!
!| |!
!************************************************************************************************!
!************************************************************************************************!
!| ___ _ _ ___ ____ ____ |!
!| | \_/ |__] |___ [__ |!
!| | | | |___ ___] |!
!| |!
!************************************************************************************************!
!************************************************************************************************!
!| ___ ____ ____ ____ _ _ _ ____ ___ ___ _ _ ___ ____ ____ |!
!| | \ |___ |__/ |__/ | | | |___ | \ | \_/ |__] |___ [__ |!
!| |__/ |___ | \ | \ | \/ |___ |__/ | | | |___ ___] |!
!| |!
!************************************************************************************************!
!------------------------------------------------------------------------------------------------!
! !
! DESCRIPTION: !
! ------------ !
! !
! DESCRIPTION NEEDED !
! | | !
! !
!------------------------------------------------------------------------------------------------!
!============================|=========================|==========================================
!************************************************************************************************!
!| ___ ____ _ _ _ ____ ___ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ |!
!| |__] |__/ | | | |__| | |___ |___ | | |\ | | | | | | |\ | [__ |!
!| | | \ | \/ | | | |___ | |__| | \| |___ | | |__| | \| ___] |!
!| |!
!************************************************************************************************!
!************************************************************************************************!
!| ___ _ _ ___ _ _ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ |!
!| |__] | | |__] | | | |___ | | |\ | | | | | | |\ | [__ |!
!| | |__| |__] |___ | |___ | |__| | \| |___ | | |__| | \| ___] |!
!| |!
!************************************************************************************************!
!------------------------------------------------------------------------------------------------!
! !
! DESCRIPTION: !
! ------------ !
! !
! DESCRIPTION NEEDED !
! | | !
! !
! ARGUMENTS: !
! ---------- !
! Name Description !
! ---- ----------- !
! - - !
! !
! RETURN: !
! ------- !
! - !
! !
!------------------------------------------------------------------------------------------------!
!===========|==========================|======================|======|=======|====================
!=================================================================================================
end module MODULE_FILE

178
docs/templates/Template.c vendored Normal file
View file

@ -0,0 +1,178 @@
/*================================================================================================*\
|| ||
|| /$$$$$$$ /$$ /$$ /$$ /$$ ||
|| | $$__ $$|__/ | $$ /$ | $$| $$ ||
|| | $$ \ $$ /$$ /$$$$$$ | $$ /$$$| $$| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ ||
|| | $$$$$$$ | $$ /$$__ $$ | $$/$$ $$ $$| $$__ $$ /$$__ $$ /$$__ $$ /$$__ $$ ||
|| | $$__ $$| $$| $$ \ $$ | $$$$_ $$$$| $$ \ $$| $$ \ $$| $$ \ $$| $$ \ $$ ||
|| | $$ \ $$| $$| $$ | $$ | $$$/ \ $$$| $$ | $$| $$ | $$| $$ | $$| $$ | $$ ||
|| | $$$$$$$/| $$| $$$$$$$ | $$/ \ $$| $$ | $$| $$$$$$/| $$$$$$/| $$$$$$$/ ||
|| |_______/ |__/ \____ $$ |__/ \__/|__/ |__/ \______/ \______/ | $$____/ ||
|| /$$ \ $$ | $$ ||
|| | $$$$$$/ | $$ ||
|| \______/ |__/ ||
|| ||
|| DESCRIPTION: ||
|| ------------ ||
|| ||
|| DESCRIPTION NEEDED. ||
|| | | ||
|| ||
|| -------------------------------------------------------------------------------------------- ||
|| Copyright (c) 2023, High Performance Computing Center - University of Stuttgart ||
|| ||
|| Redistribution and use in source and binary forms, with or without modification, are ||
|| permitted provided that the following conditions are met: ||
|| ||
|| (1) Redistributions of source code must retain the above copyright notice, this list of ||
|| conditions and the following disclaimer. ||
|| ||
|| (2) Redistributions in binary form must reproduce the above copyright notice, this list ||
|| of conditions and the following disclaimer in the documentation and/or other ||
|| materials provided with the distribution. ||
|| ||
|| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS ||
|| OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ||
|| MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ||
|| COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ||
|| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ||
|| SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ||
|| HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ||
|| TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ||
|| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ||
|| ||
\*================================================================================================*/
/**************************************************************************************************\
|| _ _ _ ____ _ _ _ ___ ____ ||
|| | |\ | | | | | | \ |___ ||
|| | | \| |___ |___ |__| |__/ |___ ||
|| ||
\**************************************************************************************************/
/**************************************************************************************************\
|| ____ _ _ ___ ____ ____ _ _ ____ _ _ _ ____ ____ _ ____ ___ _ ____ ____ ||
|| |___ \/ | |___ |__/ |\ | |__| | | | |__| |__/ | |__| |__] | |___ [__ ||
|| |___ _/\_ | |___ | \ | \| | | |___ \/ | | | \ | | | |__] |___ |___ ___] ||
|| ||
\**************************************************************************************************/
/**************************************************************************************************\
|| ____ _ _ ___ ____ ____ _ _ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ ||
|| |___ \/ | |___ |__/ |\ | |__| | | | | |\ | [__ | |__| |\ | | [__ ||
|| |___ _/\_ | |___ | \ | \| | | |___ |___ |__| | \| ___] | | | | \| | ___] ||
|| ||
\**************************************************************************************************/
/**************************************************************************************************\
|| ____ _ ____ ___ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ ||
|| | __ | | | |__] |__| | | | | |\ | [__ | |__| |\ | | [__ ||
|| |__] |___ |__| |__] | | |___ |___ |__| | \| ___] | | | | \| | ___] ||
|| ||
\**************************************************************************************************/
/**************************************************************************************************\
|| ___ ____ _ _ _ ____ ___ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ ||
|| |__] |__/ | | | |__| | |___ |___ | | |\ | | | | | | |\ | [__ ||
|| | | \ | \/ | | | |___ | |__| | \| |___ | | |__| | \| ___] ||
|| ||
\**************************************************************************************************/
/**************************************************************************************************\
|| ___ _ _ ___ _ _ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ ||
|| |__] | | |__] | | | |___ | | |\ | | | | | | |\ | [__ ||
|| | |__| |__] |___ | |___ | |__| | \| |___ | | |__| | \| ___] ||
|| ||
\**************************************************************************************************/
/*------------------------------------------------------------------------------------------------*\
! !
! DESCRIPTION: !
! ------------ !
! !
! DESCRIPTION NEEDED !
! | | !
! !
! RETURN: !
! ------- !
! !
! - !
! !
\*------------------------------------------------------------------------------------------------*/
/*-----------------------*\
! DEFINE INT VARIABLES: !
\*-----------------------*/
/*-----------------------*\
! DEFINE FLOAT VARIABLES: !
\*-----------------------*/
/*-----------------------*\
! DEFINE CHAR VARIABLES: !
\*-----------------------*/
/*-----------------------*\
! DEFINE STRUCTS: !
\*-----------------------*/
/*--------------------------------------------------------*\
! COMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENT !
\*--------------------------------------------------------*/
#ifndef HEADER_H
#define HEADER_H
/************************************************************************************************\
|| _ _ _ ____ _ _ _ ___ ____ ||
|| | |\ | | | | | | \ |___ ||
|| | | \| |___ |___ |__| |__/ |___ ||
|| ||
\************************************************************************************************/
/************************************************************************************************\
|| ___ ____ _ _ _ _ ___ _ _ _ ____ ___ _ _ ___ ____ ____ ||
|| |__] |__/ | |\/| | | | | | |___ | \_/ |__] |___ [__ ||
|| | | \ | | | | | | \/ |___ | | | |___ ___] ||
|| ||
\************************************************************************************************/
/************************************************************************************************\
|| _ _ ____ ____ ____ ____ ____ ||
|| |\/| |__| | |__/ | | [__ ||
|| | | | | |___ | \ |__| ___] ||
|| ||
\************************************************************************************************/
/************************************************************************************************\
|| ____ ____ _ _ ____ ___ ____ _ _ ___ ____ ||
|| | | | |\ | [__ | |__| |\ | | [__ ||
|| |___ |__| | \| ___] | | | | \| | ___] ||
|| ||
\************************************************************************************************/
/************************************************************************************************\
|| ____ _ _ ___ ____ ____ _ _ ____ _ _ _ ____ ____ _ ____ ___ _ ____ ____ ||
|| |___ \/ | |___ |__/ |\ | |__| | | | |__| |__/ | |__| |__] | |___ [__ ||
|| |___ _/\_ | |___ | \ | \| | | |___ \/ | | | \ | | | |__] |___ |___ ___] ||
|| ||
\************************************************************************************************/
/************************************************************************************************\
|| ____ _ _ ___ ____ ____ _ _ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ ||
|| |___ \/ | |___ |__/ |\ | |__| | | | | |\ | [__ | |__| |\ | | [__ ||
|| |___ _/\_ | |___ | \ | \| | | |___ |___ |__| | \| ___] | | | | \| | ___] ||
|| ||
\************************************************************************************************/
/************************************************************************************************\
|| ___ _ _ ___ ____ ____ ||
|| | \_/ |__] |___ [__ ||
|| | | | |___ ___] ||
|| ||
\************************************************************************************************/
/************************************************************************************************\
|| ___ ____ ____ ____ _ _ _ ____ ___ ___ _ _ ___ ____ ____ ||
|| | \ |___ |__/ |__/ | | | |___ | \ | \_/ |__] |___ [__ ||
|| |__/ |___ | \ | \ | \/ |___ |__/ | | | |___ ___] ||
|| ||
\************************************************************************************************/
/*----------------------------------------------------------------------------------------------*\
! !
! DESCRIPTION: !
! ------------ !
! !
! DESCRIPTION NEEDED !
! | | !
! !
\*----------------------------------------------------------------------------------------------*/
//===========================|=========================|==========================================
/************************************************************************************************\
|| ___ _ _ ___ _ _ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ ||
|| |__] | | |__] | | | |___ | | |\ | | | | | | |\ | [__ ||
|| | |__| |__] |___ | |___ | |__| | \| |___ | | |__| | \| ___] ||
|| ||
\************************************************************************************************/
//==========|==========================|======================|======|=======|====================
//================================================================================================
#endif

121
docs/templates/Template.py vendored Normal file
View file

@ -0,0 +1,121 @@
#*================================================================================================*#
#| |#
#| /$$$$$$$ /$$ /$$ /$$ /$$ |#
#| | $$__ $$|__/ | $$ /$ | $$| $$ |#
#| | $$ \ $$ /$$ /$$$$$$ | $$ /$$$| $$| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ |#
#| | $$$$$$$ | $$ /$$__ $$ | $$/$$ $$ $$| $$__ $$ /$$__ $$ /$$__ $$ /$$__ $$ |#
#| | $$__ $$| $$| $$ \ $$ | $$$$_ $$$$| $$ \ $$| $$ \ $$| $$ \ $$| $$ \ $$ |#
#| | $$ \ $$| $$| $$ | $$ | $$$/ \ $$$| $$ | $$| $$ | $$| $$ | $$| $$ | $$ |#
#| | $$$$$$$/| $$| $$$$$$$ | $$/ \ $$| $$ | $$| $$$$$$/| $$$$$$/| $$$$$$$/ |#
#| |_______/ |__/ \____ $$ |__/ \__/|__/ |__/ \______/ \______/ | $$____/ |#
#| /$$ \ $$ | $$ |#
#| | $$$$$$/ | $$ |#
#| \______/ |__/ |#
#| |#
#| DESCRIPTION: |#
#| ------------ |#
#| |#
#| DESCRIPTION NEEDED. |#
#| | | |#
#| |#
#| -------------------------------------------------------------------------------------------- |#
#| Copyright (c) 2023, High Performance Computing Center - University of Stuttgart |#
#| |#
#| Redistribution and use in source and binary forms, with or without modification, are |#
#| permitted provided that the following conditions are met: |#
#| |#
#| (1) Redistributions of source code must retain the above copyright notice, this list of |#
#| conditions and the following disclaimer. |#
#| |#
#| (2) Redistributions in binary form must reproduce the above copyright notice, this list |#
#| of conditions and the following disclaimer in the documentation and/or other |#
#| materials provided with the distribution. |#
#| |#
#| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS |#
#| OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |#
#| MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |#
#| COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |#
#| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |#
#| SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |#
#| HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |#
#| TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |#
#| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |#
#| |#
#*================================================================================================*#
#**************************************************************************************************#
#| _ _ _ ___ ____ ____ ___ |#
#| | |\/| |__] | | |__/ | |#
#| | | | | |__| | \ | |#
#| |#
#**************************************************************************************************#
#**************************************************************************************************#
#| ____ ____ _ _ ____ ___ ____ _ _ ___ ____ |#
#| | | | |\ | [__ | |__| |\ | | [__ |#
#| |___ |__| | \| ___] | | | | \| | ___] |#
#| |#
#**************************************************************************************************#
#**************************************************************************************************#
#| ____ _ _ ___ ____ ____ _ _ ____ _ _ _ ____ ____ _ ____ ___ _ ____ ____ |#
#| |___ \/ | |___ |__/ |\ | |__| | | | |__| |__/ | |__| |__] | |___ [__ |#
#| |___ _/\_ | |___ | \ | \| | | |___ \/ | | | \ | | | |__] |___ |___ ___] |#
#| |#
#**************************************************************************************************#
#**************************************************************************************************#
#| ____ _ _ ___ ____ ____ _ _ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ |#
#| |___ \/ | |___ |__/ |\ | |__| | | | | |\ | [__ | |__| |\ | | [__ |#
#| |___ _/\_ | |___ | \ | \| | | |___ |___ |__| | \| ___] | | | | \| | ___] |#
#| |#
#**************************************************************************************************#
#**************************************************************************************************#
#| ____ _ ____ ___ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ |#
#| | __ | | | |__] |__| | | | | |\ | [__ | |__| |\ | | [__ |#
#| |__] |___ |__| |__] | | |___ |___ |__| | \| ___] | | | | \| | ___] |#
#| |#
#**************************************************************************************************#
#**************************************************************************************************#
#| ___ ____ _ _ _ ____ ___ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ |#
#| |__] |__/ | | | |__| | |___ |___ | | |\ | | | | | | |\ | [__ |#
#| | | \ | \/ | | | |___ | |__| | \| |___ | | |__| | \| ___] |#
#| |#
#**************************************************************************************************#
#**************************************************************************************************#
#| ___ _ _ ___ _ _ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ |#
#| |__] | | |__] | | | |___ | | |\ | | | | | | |\ | [__ |#
#| | |__| |__] |___ | |___ | |__| | \| |___ | | |__| | \| ___] |#
#| |#
#**************************************************************************************************#
#==================================================================================================#
#--------------------------------------------------------------------------------------------------#
# #
# DESCRIPTION: #
# ------------ #
# #
# DESCRIPTION NEEDED #
# | | #
# #
# ARGUMENTS: #
# ---------- #
# Name Description #
# ---- ----------- #
# - - #
# #
# RETURN: #
# ------- #
# - #
# #
#--------------------------------------------------------------------------------------------------#
#-------------------------#
# DEFINE INT VARIABLES: #
#-------------------------#
#-------------------------#
# DEFINE FLOAT VARIABLES: #
#-------------------------#
#-------------------------#
# DEFINE CHAR VARIABLES: #
#-------------------------#
#-------------------------#
# DEFINE STRUCTS: #
#-------------------------#
#----------------------------------------------------------#
# COMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENT #
#----------------------------------------------------------#

47
docs/templates/Template.txt vendored Normal file
View file

@ -0,0 +1,47 @@
#*================================================================================================*#
#| |#
#| /$$$$$$$ /$$ /$$ /$$ /$$ |#
#| | $$__ $$|__/ | $$ /$ | $$| $$ |#
#| | $$ \ $$ /$$ /$$$$$$ | $$ /$$$| $$| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ |#
#| | $$$$$$$ | $$ /$$__ $$ | $$/$$ $$ $$| $$__ $$ /$$__ $$ /$$__ $$ /$$__ $$ |#
#| | $$__ $$| $$| $$ \ $$ | $$$$_ $$$$| $$ \ $$| $$ \ $$| $$ \ $$| $$ \ $$ |#
#| | $$ \ $$| $$| $$ | $$ | $$$/ \ $$$| $$ | $$| $$ | $$| $$ | $$| $$ | $$ |#
#| | $$$$$$$/| $$| $$$$$$$ | $$/ \ $$| $$ | $$| $$$$$$/| $$$$$$/| $$$$$$$/ |#
#| |_______/ |__/ \____ $$ |__/ \__/|__/ |__/ \______/ \______/ | $$____/ |#
#| /$$ \ $$ | $$ |#
#| | $$$$$$/ | $$ |#
#| \______/ |__/ |#
#| |#
#| DESCRIPTION: |#
#| ------------ |#
#| |#
#| DESCRIPTION NEEDED. |#
#| | | |#
#| |#
#| -------------------------------------------------------------------------------------------- |#
#| Copyright (c) 2023, High Performance Computing Center - University of Stuttgart |#
#| |#
#| Redistribution and use in source and binary forms, with or without modification, are |#
#| permitted provided that the following conditions are met: |#
#| |#
#| (1) Redistributions of source code must retain the above copyright notice, this list of |#
#| conditions and the following disclaimer. |#
#| |#
#| (2) Redistributions in binary form must reproduce the above copyright notice, this list |#
#| of conditions and the following disclaimer in the documentation and/or other |#
#| materials provided with the distribution. |#
#| |#
#| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS |#
#| OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |#
#| MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |#
#| COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |#
#| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |#
#| SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |#
#| HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |#
#| TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |#
#| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |#
#| |#
#*================================================================================================*#
#----------------------------------------------------------#
# COMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENT #
#----------------------------------------------------------#

View file

@ -1,299 +0,0 @@
/*==================================================================================================================================*\
|| ||
|| /$$$$$$$ /$$ /$$ /$$ /$$ ||
|| | $$__ $$|__/ | $$ /$ | $$| $$ ||
|| | $$ \ $$ /$$ /$$$$$$ | $$ /$$$| $$| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ ||
|| | $$$$$$$ | $$ /$$__ $$ | $$/$$ $$ $$| $$__ $$ /$$__ $$ /$$__ $$ /$$__ $$ ||
|| | $$__ $$| $$| $$ \ $$ | $$$$_ $$$$| $$ \ $$| $$ \ $$| $$ \ $$| $$ \ $$ ||
|| | $$ \ $$| $$| $$ | $$ | $$$/ \ $$$| $$ | $$| $$ | $$| $$ | $$| $$ | $$ ||
|| | $$$$$$$/| $$| $$$$$$$ | $$/ \ $$| $$ | $$| $$$$$$/| $$$$$$/| $$$$$$$/ ||
|| |_______/ |__/ \____ $$ |__/ \__/|__/ |__/ \______/ \______/ | $$____/ ||
|| /$$ \ $$ | $$ ||
|| | $$$$$$/ | $$ ||
|| \______/ |__/ ||
|| ||
|| File: header.h ||
|| ----- ||
|| ||
|| DESCRIPTION: ||
|| ------------ ||
|| DESCRIPTION NEEDED. ||
|| ||
|| STRUCTS: ||
|| -------- ||
|| ||
|| PUBLIC FUNCTIONS: ||
|| ----------------- ||
|| ||
|| DEVELOPMENT HISTORY: ||
|| -------------------- ||
|| ||
|| Date Author Change Id Release Description Of Change ||
|| ---- ------ --------- ------- --------------------- ||
|| - Patrick Vogler B87D120 V - header file created ||
|| - Patrick Vogler B880CA2 V - header file patched ||
|| - Patrick Vogler B87E7E4 V - header file updated ||
|| - Patrick Vogler B87F684 V - header file new version ||
|| ||
|| -------------------------------------------------------------------------------------------------------------------- ||
|| ||
|| Copyright (c) 2023, High Performance Computing Center - University of Stuttgart ||
|| ||
|| Redistribution and use in source and binary forms, with or without modification, are permitted provided that the ||
|| following conditions are met: ||
|| ||
|| (1) Redistributions of source code must retain the above copyright notice, this list of conditions and ||
|| the following disclaimer. ||
|| ||
|| (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions ||
|| and the following disclaimer in the documentation and/or other materials provided with the ||
|| distribution. ||
|| ||
|| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, ||
|| INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ||
|| DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ||
|| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ||
|| SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ||
|| WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE ||
|| USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ||
|| ||
\*==================================================================================================================================*/
#ifndef HEADER_H
#define HEADER_H
/************************************************************************************************************\
|| _ _ _ ____ _ _ _ ___ ____ ||
|| | |\ | | | | | | \ |___ ||
|| | | \| |___ |___ |__| |__/ |___ ||
|| ||
\************************************************************************************************************/
/************************************************************************************************************\
|| _ _ ____ ____ ____ ____ ____ ||
|| |\/| |__| | |__/ | | [__ ||
|| | | | | |___ | \ |__| ___] ||
|| ||
\************************************************************************************************************/
/*----------------------------------------------------------------------------------------------------------*\
! DESCRIPTION: !
! ------------ !
! DESCRIPTION NEEDED !
! !
! Macros: !
! ------- !
! Macro Description !
! ----- ----------- !
! !
! !
! DEVELOPMENT HISTORY: !
! -------------------- !
! !
! Date Author Change Id Release Description Of Change !
! ---- ------ --------- ------- --------------------- !
! - Patrick Vogler B87D120 V - Macros created !
! - Patrick Vogler B880CA2 V - Macros patched !
! - Patrick Vogler B87E7E4 V - Macros updated !
! - Patrick Vogler B87F684 V - Macros new version !
! !
\*----------------------------------------------------------------------------------------------------------*/
/************************************************************************************************************\
|| ____ ____ _ _ ____ ___ ____ _ _ ___ ____ ||
|| | | | |\ | [__ | |__| |\ | | [__ ||
|| |___ |__| | \| ___] | | | | \| | ___] ||
|| ||
\************************************************************************************************************/
/*----------------------------------------------------------------------------------------------------------*\
! DESCRIPTION: !
! ------------ !
! DESCRIPTION NEEDED !
! !
! CONSTANTS: !
! ----------- !
! Constant Description !
! -------- ----------- !
! !
! !
! DEVELOPMENT HISTORY: !
! -------------------- !
! !
! Date Author Change Id Release Description Of Change !
! ---- ------ --------- ------- --------------------- !
! - Patrick Vogler B87D120 V - Constants created !
! - Patrick Vogler B880CA2 V - Constants patched !
! - Patrick Vogler B87E7E4 V - Constants updated !
! - Patrick Vogler B87F684 V - Constants new version !
! !
\*----------------------------------------------------------------------------------------------------------*/
/************************************************************************************************************\
|| ____ _ _ ___ ____ ____ _ _ ____ _ _ _ ____ ____ _ ____ ___ _ ____ ____ ||
|| |___ \/ | |___ |__/ |\ | |__| | | | |__| |__/ | |__| |__] | |___ [__ ||
|| |___ _/\_ | |___ | \ | \| | | |___ \/ | | | \ | | | |__] |___ |___ ___] ||
|| ||
\************************************************************************************************************/
/*----------------------------------------------------------------------------------------------------------*\
! DESCRIPTION: !
! ------------ !
! DESCRIPTION NEEDED !
! !
! VARIABLES: !
! ----------- !
! VARIABLE Description !
! -------- ----------- !
! !
! !
! DEVELOPMENT HISTORY: !
! -------------------- !
! !
! Date Author Change Id Release Description Of Change !
! ---- ------ --------- ------- --------------------- !
! - Patrick Vogler B87D120 V - Variables created !
! - Patrick Vogler B880CA2 V - Variables patched !
! - Patrick Vogler B87E7E4 V - Variables updated !
! - Patrick Vogler B87F684 V - Variables new version !
! !
\*----------------------------------------------------------------------------------------------------------*/
/************************************************************************************************************\
|| ____ _ _ ___ ____ ____ _ _ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ ||
|| |___ \/ | |___ |__/ |\ | |__| | | | | |\ | [__ | |__| |\ | | [__ ||
|| |___ _/\_ | |___ | \ | \| | | |___ |___ |__| | \| ___] | | | | \| | ___] ||
|| ||
\************************************************************************************************************/
/*----------------------------------------------------------------------------------------------------------*\
! DESCRIPTION: !
! ------------ !
! DESCRIPTION NEEDED !
! !
! CONSTANTS: !
! ----------- !
! Constant Description !
! -------- ----------- !
! !
! !
! DEVELOPMENT HISTORY: !
! -------------------- !
! !
! Date Author Change Id Release Description Of Change !
! ---- ------ --------- ------- --------------------- !
! - Patrick Vogler B87D120 V - Constants created !
! - Patrick Vogler B880CA2 V - Constants patched !
! - Patrick Vogler B87E7E4 V - Constants updated !
! - Patrick Vogler B87F684 V - Constants new version !
! !
\*----------------------------------------------------------------------------------------------------------*/
/************************************************************************************************************\
|| ___ _ _ ___ ____ ____ ||
|| | \_/ |__] |___ [__ ||
|| | | | |___ ___] ||
|| ||
\************************************************************************************************************/
/*----------------------------------------------------------------------------------------------------------*\
! STRUCT NAME: Template !
! ----------- !
! !
! DESCRIPTION: !
! ------------ !
! DESCRIPTION NEEDED !
! !
! PARAMETERS: !
! ----------- !
! Variable Type Description !
! -------- ---- ----------- !
! - - - !
! !
! DEPENDENCIES: !
! ------------- !
! Variable Type Description !
! -------- ---- ----------- !
! !
! DEVELOPMENT HISTORY: !
! -------------------- !
! !
! Date Author Change Id Release Description Of Change !
! ---- ------ --------- ------- --------------------- !
! - Patrick Vogler B87D120 V - Struct created !
! - Patrick Vogler B880CA2 V - Struct patched !
! - Patrick Vogler B87E7E4 V - Struct updated !
! - Patrick Vogler B87F684 V - Struct new version !
! !
\*----------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------*\
! ENUM NAME: Template !
! ----------- !
! !
! DESCRIPTION: !
! ------------ !
! DESCRIPTION NEEDED !
! !
! PARAMETERS: !
! ----------- !
! Variable Type Description !
! -------- ---- ----------- !
! - - - !
! !
! DEPENDENCIES: !
! ------------- !
! Variable Type Description !
! -------- ---- ----------- !
! !
! DEVELOPMENT HISTORY: !
! -------------------- !
! !
! Date Author Change Id Release Description Of Change !
! ---- ------ --------- ------- --------------------- !
! - Patrick Vogler B87D120 V - Enum created !
! - Patrick Vogler B880CA2 V - Enum patched !
! - Patrick Vogler B87E7E4 V - Enum updated !
! - Patrick Vogler B87F684 V - Enum new version !
! !
\*----------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------*\
! UNION NAME: Template !
! ----------- !
! !
! DESCRIPTION: !
! ------------ !
! DESCRIPTION NEEDED !
! !
! PARAMETERS: !
! ----------- !
! Variable Type Description !
! -------- ---- ----------- !
! - - - !
! !
! DEPENDENCIES: !
! ------------- !
! Variable Type Description !
! -------- ---- ----------- !
! !
! DEVELOPMENT HISTORY: !
! -------------------- !
! !
! Date Author Change Id Release Description Of Change !
! ---- ------ --------- ------- --------------------- !
! - Patrick Vogler B87D120 V - Union created !
! - Patrick Vogler B880CA2 V - Union patched !
! - Patrick Vogler B87E7E4 V - Union updated !
! - Patrick Vogler B87F684 V - Union new version !
! !
\*----------------------------------------------------------------------------------------------------------*/
/************************************************************************************************************\
|| ___ _ _ ___ _ _ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ ||
|| |__] | | |__] | | | |___ | | |\ | | | | | | |\ | [__ ||
|| | |__| |__] |___ | |___ | |__| | \| |___ | | |__| | \| ___] ||
|| ||
\************************************************************************************************************/
/*----------------------------------------------------------------------------------------------------------*\
! TYPE NAME: Template !
! ----------- !
! !
! DESCRIPTION: !
! ------------ !
! DESCRIPTION NEEDED !
! !
\*----------------------------------------------------------------------------------------------------------*/
#endif

View file

@ -1,179 +0,0 @@
/*==================================================================================================================================*\
|| ||
|| /$$$$$$$ /$$ /$$ /$$ /$$ ||
|| | $$__ $$|__/ | $$ /$ | $$| $$ ||
|| | $$ \ $$ /$$ /$$$$$$ | $$ /$$$| $$| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ ||
|| | $$$$$$$ | $$ /$$__ $$ | $$/$$ $$ $$| $$__ $$ /$$__ $$ /$$__ $$ /$$__ $$ ||
|| | $$__ $$| $$| $$ \ $$ | $$$$_ $$$$| $$ \ $$| $$ \ $$| $$ \ $$| $$ \ $$ ||
|| | $$ \ $$| $$| $$ | $$ | $$$/ \ $$$| $$ | $$| $$ | $$| $$ | $$| $$ | $$ ||
|| | $$$$$$$/| $$| $$$$$$$ | $$/ \ $$| $$ | $$| $$$$$$/| $$$$$$/| $$$$$$$/ ||
|| |_______/ |__/ \____ $$ |__/ \__/|__/ |__/ \______/ \______/ | $$____/ ||
|| /$$ \ $$ | $$ ||
|| | $$$$$$/ | $$ ||
|| \______/ |__/ ||
|| ||
|| FILE NAME: source.c ||
|| ||
|| ||
|| DESCRIPTION: ||
|| ------------ ||
|| DESCRIPTION NEEDED. ||
|| ||
|| FILE REFERENCES: ||
|| ---------------- ||
|| ||
|| Name I/O Description ||
|| ---- --- ----------- ||
|| none - - ||
|| ||
|| ||
|| PRIVATE FUNCTIONS: ||
|| ------------------ ||
|| ||
|| PUBLIC FUNCTIONS: ||
|| ----------------- ||
|| ||
|| DEVELOPMENT HISTORY: ||
|| -------------------- ||
|| ||
|| Date Author Change Id Release Description Of Change ||
|| ---- ------ --------- ------- --------------------- ||
|| - Patrick Vogler B87D120 V - source file created ||
|| - Patrick Vogler B880CA2 V - source file patched ||
|| - Patrick Vogler B87E7E4 V - source file updated ||
|| - Patrick Vogler B87F684 V - source file new version ||
|| ||
|| -------------------------------------------------------------------------------------------------------------------- ||
|| ||
|| Copyright (c) 2023, High Performance Computing Center - University of Stuttgart ||
|| ||
|| Redistribution and use in source and binary forms, with or without modification, are permitted provided that the ||
|| following conditions are met: ||
|| ||
|| (1) Redistributions of source code must retain the above copyright notice, this list of conditions and ||
|| the following disclaimer. ||
|| ||
|| (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions ||
|| and the following disclaimer in the documentation and/or other materials provided with the ||
|| distribution. ||
|| ||
|| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, ||
|| INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ||
|| DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ||
|| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ||
|| SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ||
|| WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE ||
|| USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ||
|| ||
\*==================================================================================================================================*/
/************************************************************************************************************\
|| _ _ _ ____ _ _ _ ___ ____ ||
|| | |\ | | | | | | \ |___ ||
|| | | \| |___ |___ |__| |__/ |___ ||
|| ||
\************************************************************************************************************/
/************************************************************************************************************\
|| ____ _ _ ___ ____ ____ _ _ ____ _ _ _ ____ ____ _ ____ ___ _ ____ ____ ||
|| |___ \/ | |___ |__/ |\ | |__| | | | |__| |__/ | |__| |__] | |___ [__ ||
|| |___ _/\_ | |___ | \ | \| | | |___ \/ | | | \ | | | |__] |___ |___ ___] ||
|| ||
\************************************************************************************************************/
/************************************************************************************************************\
|| ____ _ _ ___ ____ ____ _ _ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ ||
|| |___ \/ | |___ |__/ |\ | |__| | | | | |\ | [__ | |__| |\ | | [__ ||
|| |___ _/\_ | |___ | \ | \| | | |___ |___ |__| | \| ___] | | | | \| | ___] ||
|| ||
\************************************************************************************************************/
/************************************************************************************************************\
|| ___ ____ _ _ _ ____ ___ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ ||
|| |__] |__/ | | | |__| | |___ |___ | | |\ | | | | | | |\ | [__ ||
|| | | \ | \/ | | | |___ | |__| | \| |___ | | |__| | \| ___] ||
|| ||
\************************************************************************************************************/
/*----------------------------------------------------------------------------------------------------------*\
! FUNCTION NAME: void *template(void) !
! -------------- !
! !
! DESCRIPTION: !
! ------------ !
! DESCRIPTION NEEDED !
! !
! PARAMETERS: !
! ----------- !
! Variable Type Description !
! -------- ---- ----------- !
! - - - !
! !
! RETURN VALUE: !
! ------------- !
! Type Description !
! ---- ----------- !
! - - !
! !
! DEVELOPMENT HISTORY: !
! -------------------- !
! !
! Date Author Change Id Release Description Of Change !
! ---- ------ --------- ------- --------------------- !
! - Patrick Vogler B87D120 V - function created !
! - Patrick Vogler B880CA2 V - function patched !
! - Patrick Vogler B87E7E4 V - function updated !
! - Patrick Vogler B87F684 V - function new version !
! !
\*----------------------------------------------------------------------------------------------------------*/
/************************************************************************************************************\
|| ___ _ _ ___ _ _ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ ||
|| |__] | | |__] | | | |___ | | |\ | | | | | | |\ | [__ ||
|| | |__| |__] |___ | |___ | |__| | \| |___ | | |__| | \| ___] ||
|| ||
\************************************************************************************************************/
/*----------------------------------------------------------------------------------------------------------*\
! FUNCTION NAME: void *test(void) !
! -------------- !
! !
! DESCRIPTION: !
! ------------ !
! DESCRIPTION NEEDED !
! !
! PARAMETERS: !
! ----------- !
! Variable Type Description !
! -------- ---- ----------- !
! - - - !
! !
! RETURN VALUE: !
! ------------- !
! Type Description !
! ---- ----------- !
! - - !
! !
! DEVELOPMENT HISTORY: !
! -------------------- !
! !
! Date Author Change Id Release Description Of Change !
! ---- ------ --------- ------- --------------------- !
! - Patrick Vogler B87D120 V - function created !
! - Patrick Vogler B880CA2 V - function patched !
! - Patrick Vogler B87E7E4 V - function updated !
! - Patrick Vogler B87F684 V - function new version !
! !
\*----------------------------------------------------------------------------------------------------------*/
/*-----------------------*\
! DEFINE INT VARIABLES: !
\*-----------------------*/
/*-----------------------*\
! DEFINE FLOAT VARIABLES: !
\*-----------------------*/
/*-----------------------*\
! DEFINE CHAR VARIABLES: !
\*-----------------------*/
/*-----------------------*\
! DEFINE STRUCTS: !
\*-----------------------*/
/*--------------------------------------------------------*\
! COMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENT !
\*--------------------------------------------------------*/

View file

@ -0,0 +1,70 @@
/*================================================================================================*\
|| ||
|| /$$$$$$$ /$$ /$$ /$$ /$$ ||
|| | $$__ $$|__/ | $$ /$ | $$| $$ ||
|| | $$ \ $$ /$$ /$$$$$$ | $$ /$$$| $$| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ ||
|| | $$$$$$$ | $$ /$$__ $$ | $$/$$ $$ $$| $$__ $$ /$$__ $$ /$$__ $$ /$$__ $$ ||
|| | $$__ $$| $$| $$ \ $$ | $$$$_ $$$$| $$ \ $$| $$ \ $$| $$ \ $$| $$ \ $$ ||
|| | $$ \ $$| $$| $$ | $$ | $$$/ \ $$$| $$ | $$| $$ | $$| $$ | $$| $$ | $$ ||
|| | $$$$$$$/| $$| $$$$$$$ | $$/ \ $$| $$ | $$| $$$$$$/| $$$$$$/| $$$$$$$/ ||
|| |_______/ |__/ \____ $$ |__/ \__/|__/ |__/ \______/ \______/ | $$____/ ||
|| /$$ \ $$ | $$ ||
|| | $$$$$$/ | $$ ||
|| \______/ |__/ ||
|| ||
|| DESCRIPTION: ||
|| ------------ ||
|| ||
|| This file defines simple read and write functions used to access conforming ||
|| netCDF datasets. ||
|| ||
|| -------------------------------------------------------------------------------------------- ||
|| Copyright (c) 2023, High Performance Computing Center - University of Stuttgart ||
|| ||
|| Redistribution and use in source and binary forms, with or without modification, are ||
|| permitted provided that the following conditions are met: ||
|| ||
|| (1) Redistributions of source code must retain the above copyright notice, this list of ||
|| conditions and the following disclaimer. ||
|| ||
|| (2) Redistributions in binary form must reproduce the above copyright notice, this list ||
|| of conditions and the following disclaimer in the documentation and/or other ||
|| materials provided with the distribution. ||
|| ||
|| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS ||
|| OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ||
|| MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ||
|| COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ||
|| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ||
|| SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ||
|| HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ||
|| TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ||
|| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ||
|| ||
\*================================================================================================*/
#ifndef NETCDF_H
#define NETCDF_H
/************************************************************************************************\
|| _ _ _ ____ _ _ _ ___ ____ ||
|| | |\ | | | | | | \ |___ ||
|| | | \| |___ |___ |__| |__/ |___ ||
|| ||
\************************************************************************************************/
#include <bwc.h>
#include <stdio.h>
#include "utilities.h"
/************************************************************************************************\
|| ___ _ _ ___ _ _ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ ||
|| |__] | | |__] | | | |___ | | |\ | | | | | | |\ | [__ ||
|| | |__| |__] |___ | |___ | |__| | \| |___ | | |__| | \| ___] ||
|| ||
\************************************************************************************************/
bwc_data* read_netCDF (char *const filename);
//==========|==========================|======================|======|=======|====================
uchar write_netCDF (bwc_data *const file,
char *const filename);
#endif

File diff suppressed because it is too large Load diff

896
src/library/codec.c Normal file
View file

@ -0,0 +1,896 @@
/*================================================================================================*\
|| ||
|| /$$$$$$$ /$$ /$$ /$$ /$$ ||
|| | $$__ $$|__/ | $$ /$ | $$| $$ ||
|| | $$ \ $$ /$$ /$$$$$$ | $$ /$$$| $$| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ ||
|| | $$$$$$$ | $$ /$$__ $$ | $$/$$ $$ $$| $$__ $$ /$$__ $$ /$$__ $$ /$$__ $$ ||
|| | $$__ $$| $$| $$ \ $$ | $$$$_ $$$$| $$ \ $$| $$ \ $$| $$ \ $$| $$ \ $$ ||
|| | $$ \ $$| $$| $$ | $$ | $$$/ \ $$$| $$ | $$| $$ | $$| $$ | $$| $$ | $$ ||
|| | $$$$$$$/| $$| $$$$$$$ | $$/ \ $$| $$ | $$| $$$$$$/| $$$$$$/| $$$$$$$/ ||
|| |_______/ |__/ \____ $$ |__/ \__/|__/ |__/ \______/ \______/ | $$____/ ||
|| /$$ \ $$ | $$ ||
|| | $$$$$$/ | $$ ||
|| \______/ |__/ ||
|| ||
|| DESCRIPTION: ||
|| ------------ ||
|| ||
|| DESCRIPTION NEEDED. ||
|| | | ||
|| ||
|| -------------------------------------------------------------------------------------------- ||
|| Copyright (c) 2023, High Performance Computing Center - University of Stuttgart ||
|| ||
|| Redistribution and use in source and binary forms, with or without modification, are ||
|| permitted provided that the following conditions are met: ||
|| ||
|| (1) Redistributions of source code must retain the above copyright notice, this list of ||
|| conditions and the following disclaimer. ||
|| ||
|| (2) Redistributions in binary form must reproduce the above copyright notice, this list ||
|| of conditions and the following disclaimer in the documentation and/or other ||
|| materials provided with the distribution. ||
|| ||
|| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS ||
|| OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ||
|| MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ||
|| COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ||
|| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ||
|| SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ||
|| HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ||
|| TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ||
|| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ||
|| ||
\*================================================================================================*/
/**************************************************************************************************\
|| _ _ _ ____ _ _ _ ___ ____ ||
|| | |\ | | | | | | \ |___ ||
|| | | \| |___ |___ |__| |__/ |___ ||
|| ||
\**************************************************************************************************/
/**************************************************************************************************\
|| ___ ____ _ _ _ ____ ___ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ ||
|| |__] |__/ | | | |__| | |___ |___ | | |\ | | | | | | |\ | [__ ||
|| | | \ | \/ | | | |___ | |__| | \| |___ | | |__| | \| ___] ||
|| ||
\**************************************************************************************************/
/**************************************************************************************************\
|| ___ _ _ ___ _ _ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ ||
|| |__] | | |__] | | | |___ | | |\ | | | | | | |\ | [__ ||
|| | |__| |__] |___ | |___ | |__| | \| |___ | | |__| | \| ___] ||
|| ||
\**************************************************************************************************/
/*------------------------------------------------------------------------------------------------*\
! !
! DESCRIPTION: !
! ------------ !
! !
! DESCRIPTION NEEDED !
! | | !
! !
! RETURN: !
! ------- !
! !
! DESCRIPTION NEEDED !
! | | !
! !
\*------------------------------------------------------------------------------------------------*/
uchar
bwc_set_com(bwc_data *const data, char const *const com, uint16 size)
{
/*-----------------------*\
! DEFINE ASSERTIONS: !
\*-----------------------*/
assert(data);
assert(com);
/*--------------------------------------------------------*\
! Save the global info structure to a temporary variable !
! to make the code more readable. !
\*--------------------------------------------------------*/
data->codestream.com->memory = calloc(size, sizeof(char));
if(!data->codestream.com->memory)
{
// memory allocation error
fprintf(stderr, MEMERROR);
return 1;
}
memcpy(data->codestream.com->memory, com, size * sizeof(char));
data->codestream.com->access = data->codestream.com->memory;
data->codestream.com->size = size;
data->codestream.com->position = 0;
return 0;
}
/*------------------------------------------------------------------------------------------------*\
! !
! DESCRIPTION: !
! ------------ !
! !
! DESCRIPTION NEEDED !
! | | !
! !
! RETURN: !
! ------- !
! !
! DESCRIPTION NEEDED !
! | | !
! !
\*------------------------------------------------------------------------------------------------*/
uchar
bwc_set_aux(bwc_data *const data, char const *const aux, uint32 size)
{
/*-----------------------*\
! DEFINE ASSERTIONS: !
\*-----------------------*/
assert(data);
assert(aux);
/*--------------------------------------------------------*\
! Save the global info structure to a temporary variable !
! to make the code more readable. !
\*--------------------------------------------------------*/
data->codestream.com->memory = calloc(size, sizeof(char));
if(!data->codestream.com->memory)
{
// memory allocation error
fprintf(stderr, MEMERROR);
return 1;
}
memcpy(data->codestream.com->memory, aux, size * sizeof(char));
data->codestream.com->access = data->codestream.com->memory;
data->codestream.com->size = size;
data->codestream.com->position = 0;
return 0;
}
/*------------------------------------------------------------------------------------------------*\
! !
! DESCRIPTION: !
! ------------ !
! !
! This function sets the error resilience marker in the bwc_field structure if an !
! error resilient compression approach is to be employed. !
! !
! RETURN: !
! ------- !
! !
! - !
! !
\*------------------------------------------------------------------------------------------------*/
void
bwc_set_error_resilience(bwc_field *const field)
{
/*-----------------------*\
! DEFINE ASSERTIONS: !
\*-----------------------*/
assert(field);
/*--------------------------------------------------------*\
! Set the error resilience flag in the bwc_field structure !
! and record the setting in the CSsgc variable. !
\*--------------------------------------------------------*/
field->control.resilience ^= 0x01;
field->control.CSsgc ^= (0x01 << 0);
}
/*------------------------------------------------------------------------------------------------*\
! !
! DESCRIPTION: !
! ------------ !
! !
! This function amends the quantization style in the bwc_field structure according !
! to the specified value. !
! !
! RETURN: !
! ------- !
! !
! - !
! !
\*------------------------------------------------------------------------------------------------*/
void
set_quant_style(bwc_field *const field,
bwc_quant_st const quantization_style)
{
/*-----------------------*\
! DEFINE ASSERTIONS: !
\*-----------------------*/
assert(field);
assert((quantization_style == bwc_qt_derived) ||
(quantization_style == bwc_qt_none));
/*--------------------------------------------------------*\
! Amend the quantization style in the bwc_field structure !
! and record the setting in the CSsgc variable. !
\*--------------------------------------------------------*/
field->control.quantization_style = quantization_style;
field->control.CSsgc |= (0x01 << 1);
}
/*------------------------------------------------------------------------------------------------*\
! !
! DESCRIPTION: !
! ------------ !
! !
! This function amends the quantization step size in the bwc_field structure !
! according to the specified value. !
! !
! RETURN: !
! ------- !
! !
! - !
! !
\*------------------------------------------------------------------------------------------------*/
void
set_quant_step_size(bwc_field *const field,
double delta)
{
/*-----------------------*\
! DEFINE STRUCTS: !
\*-----------------------*/
bwc_gl_ctrl *control;
/*-----------------------*\
! DEFINE ASSERTIONS: !
\*-----------------------*/
assert(field);
/*--------------------------------------------------------*\
! Save frequently used variables/structures to temporary !
! variables to make the code more readable. !
\*--------------------------------------------------------*/
control = &field->control;
/*--------------------------------------------------------*\
! Check if the quantization step size lies within the ac- !
! ceptable range. !
\*--------------------------------------------------------*/
if((delta <= 0) || (delta >= 2))
{
fprintf(stderr, "o==========================================================o\n"\
"| WARNING: Invalid quantization step size |\n"\
"| |\n"\
"| The quantization step size does not lie within |\n"\
"| the acceptable range of: |\n"\
"| |\n"\
"| 0 < step size < 2 |\n"\
"| |\n"\
"o==========================================================o\n");
return;
}
/*--------------------------------------------------------*\
! Reevaluate the mantissa and exponent of the user defined !
! quantization step size. !
\*--------------------------------------------------------*/
for(control->qt_exponent = 0; delta < 1; ++control->qt_exponent, delta *= 2);
control->qt_mantissa = (uint16)floor(0.5f + ((delta - 1.0f) * (1 << 16)));
if(control->qt_exponent > PREC_BIT)
{
control->qt_exponent = PREC_BIT;
control->qt_mantissa = 0;
}
if(control->qt_mantissa >= 1 << 16)
{
if(control->qt_exponent == 0)
{
control->qt_exponent = 0;
control->qt_mantissa = (1 << 16) - 1;
}
else
{
control->qt_exponent--;
control->qt_mantissa = 0;
}
}
/*--------------------------------------------------------*\
! Record the setting of the quantization step size in the !
! CSsgc variable. !
\*--------------------------------------------------------*/
control->CSsgc |= (0x01 << 2);
}
/*------------------------------------------------------------------------------------------------*\
! !
! DESCRIPTION: !
! ------------ !
! !
! This function amends the progression order in the bwc_field structure according !
! to the specified value. !
! !
! RETURN: !
! ------- !
! !
! - !
! !
\*------------------------------------------------------------------------------------------------*/
void
set_progression(bwc_field *const field,
bwc_prog_ord const progression)
{
/*-----------------------*\
! DEFINE ASSERTIONS: !
\*-----------------------*/
assert(field);
assert((progression == bwc_prog_CPRL) || (progression == bwc_prog_LRCP) ||
(progression == bwc_prog_PCRL) || (progression == bwc_prog_RLCP) ||
(progression == bwc_prog_RPCL));
/*--------------------------------------------------------*\
! Set the progression order in the bwc_field structure and !
! record the setting in the CSsgc variable. !
\*--------------------------------------------------------*/
field->control.progression = progression;
field->control.CSsgc |= (0x01 << 3);
}
/*------------------------------------------------------------------------------------------------*\
! !
! DESCRIPTION: !
! ------------ !
! !
! This function amends the wavelet kernels in the bwc_field structure according !
! to the specified values. !
! !
! RETURN: !
! ------- !
! !
! - !
! !
\*------------------------------------------------------------------------------------------------*/
void
set_kernels(bwc_field *const field,
bwc_dwt_filter const KernelX,
bwc_dwt_filter const KernelY,
bwc_dwt_filter const KernelZ,
bwc_dwt_filter const KernelTS)
{
/*-----------------------*\
! DEFINE ASSERTIONS: !
\*-----------------------*/
assert(field);
/*--------------------------------------------------------*\
! Set the wavelet kernel in the bwc_field structure and !
! record the setting in the CSsgc variable. !
\*--------------------------------------------------------*/
field->control.KernelX = KernelX ? KernelX : bwc_dwt_9_7;
field->control.KernelY = KernelY ? KernelY : bwc_dwt_9_7;
field->control.KernelZ = KernelZ ? KernelZ : bwc_dwt_9_7;
field->control.KernelTS = KernelTS ? KernelTS : bwc_dwt_haar;
field->control.CSsgc |= (0x01 << 4);
}
/*------------------------------------------------------------------------------------------------*\
! !
! DESCRIPTION: !
! ------------ !
! !
! This function amends the decomposition levels in the bwc_field structure !
! according to the specified values. !
! !
! RETURN: !
! ------- !
! !
! - !
! !
\*------------------------------------------------------------------------------------------------*/
void
bwc_set_decomp(bwc_field *const field,
uint8 const decompX,
uint8 const decompY,
uint8 const decompZ,
uint8 const decompTS)
{
/*-----------------------*\
! DEFINE FLOAT VARIABLES: !
\*-----------------------*/
double delta;
/*-----------------------*\
! DEFINE CHAR VARIABLES: !
\*-----------------------*/
uint8 levelsX, levelsY, levelsZ, levelsTS;
/*-----------------------*\
! DEFINE STRUCTS: !
\*-----------------------*/
bwc_gl_ctrl *control;
bwc_gl_inf *info;
/*-----------------------*\
! DEFINE ASSERTIONS: !
\*-----------------------*/
assert(field);
/*--------------------------------------------------------*\
! Save frequently used variables/structures to temporary !
! variables to make the code more readable. !
\*--------------------------------------------------------*/
control = &field->control;
info = field->info;
/*--------------------------------------------------------*\
! Calculate the maximum posssible decorrelations and eval- !
! uate the number of decomposition levels accordingly. !
\*--------------------------------------------------------*/
levelsX = log(info->nX) /log(2);
levelsY = log(info->nY) /log(2);
levelsZ = log(info->nZ) /log(2);
levelsTS = log(info->nTS)/log(2);
control->decompX = (info->nX >> 1) ? ((decompX < levelsX) ? decompX : levelsX) : 0;
control->decompY = (info->nY >> 1) ? ((decompY < levelsY) ? decompY : levelsY) : 0;
control->decompZ = (info->nZ >> 1) ? ((decompZ < levelsZ) ? decompZ : levelsZ) : 0;
control->decompTS = (info->nTS >> 1) ? ((decompTS < levelsTS) ? decompTS : levelsTS) : 0;
control->nDecomp = MAX(control->decompX,
MAX(control->decompY,
MAX(control->decompZ, control->decompTS)));
/*--------------------------------------------------------*\
! Check validity of decomp levels and, if necessary, reset !
! them to teir standard values. !
\*--------------------------------------------------------*/
if((control->decompX > 63) || (control->decompY > 63) ||
(control->decompZ > 63) || (control->decompTS > 31))
{
fprintf(stderr, "o==========================================================o\n"\
"| WARNING: Invalid decomposition level value |\n"\
"| |\n"\
"| The maximum acceptable decomposition level is |\n"\
"| 63 for all spatial and 31 for the temporal |\n"\
"| dimensions. |\n"\
"| |\n"\
"o==========================================================o\n");
control->decompX = (info->nX >> 1) ? 4 : 0;
control->decompY = (info->nY >> 1) ? 4 : 0;
control->decompZ = (info->nZ >> 1) ? 4 : 0;
control->decompTS = (info->nTS >> 1) ? 4 : 0;
return;
}
/*--------------------------------------------------------*\
! Record the setting of the decomposition level variables !
! in the CSsgc variable. !
\*--------------------------------------------------------*/
control->CSsgc |= (0x01 << 5);
}
/*------------------------------------------------------------------------------------------------*\
! !
! DESCRIPTION: !
! ------------ !
! !
! This function amends the precinct size in the bwc_field structure according !
! to the specified values. !
! !
! RETURN: !
! ------- !
! !
! - !
! !
\*------------------------------------------------------------------------------------------------*/
void
bwc_set_precincts(bwc_field *const field,
uint8 const pX,
uint8 const pY,
uint8 const pZ,
uint8 const pTS)
{
/*-----------------------*\
! DEFINE STRUCTS: !
\*-----------------------*/
bwc_gl_ctrl *control;
bwc_gl_inf *info;
/*-----------------------*\
! DEFINE ASSERTIONS: !
\*-----------------------*/
assert(field);
/*--------------------------------------------------------*\
! Save frequently used variables/structures to temporary !
! variables to make the code more readable. !
\*--------------------------------------------------------*/
control = &field->control;
info = field->info;
/*--------------------------------------------------------*\
! Set the specified precinct values for all valid dimen- !
! sions taking the maximum allowable size into account. !
\*--------------------------------------------------------*/
control->precSizeX = (info->nX >> 1) ? (pX ? pX : 15) : 0;
control->precSizeY = (info->nY >> 1) ? (pY ? pY : 15) : 0;
control->precSizeZ = (info->nZ >> 1) ? (pZ ? pZ : 15) : 0;
control->precSizeTS = (info->nTS >> 1) ? (pTS ? pTS : 15) : 0;
/*--------------------------------------------------------*\
! Check validity of the precint size and reset them, if !
! necessary to teir standard values. !
\*--------------------------------------------------------*/
if(((control->precSizeX < 1) && (info->nX >> 1)) ||
((control->precSizeY < 1) && (info->nY >> 1)) ||
((control->precSizeZ < 1) && (info->nZ >> 1)) ||
((control->precSizeTS < 1) && (info->nTS >> 1)) ||
(control->precSizeX > 15) || (control->precSizeY > 15) ||
(control->precSizeZ > 15) || (control->precSizeTS > 15))
{
fprintf(stderr, "o==========================================================o\n"\
"| WARNING: Invalid precinct size |\n"\
"| |\n"\
"| The maximum acceptable precinct size is 2^15, |\n"\
"| the smallest valid precinct size is 2^1. |\n"\
"| |\n"\
"o==========================================================o\n");
control->precSizeX = (info->nX >> 1) ? 15 : 0;
control->precSizeY = (info->nY >> 1) ? 15 : 0;
control->precSizeZ = (info->nZ >> 1) ? 15 : 0;
control->precSizeTS = (info->nTS >> 1) ? 15 : 0;
return;
}
/*--------------------------------------------------------*\
! Record the setting of the precinct size variables in the !
! CSsgc variable. !
\*--------------------------------------------------------*/
control->CSsgc |= (0x01 << 6);
}
/*------------------------------------------------------------------------------------------------*\
! !
! DESCRIPTION: !
! ------------ !
! !
! This function amends the codeblock size in the bwc_field structure according !
! to the specified values. !
! !
! RETURN: !
! ------- !
! !
! - !
! !
\*------------------------------------------------------------------------------------------------*/
void
bwc_set_codeblocks(bwc_field *const field,
uint8 const cbX,
uint8 const cbY,
uint8 const cbZ,
uint8 const cbTS)
{
/*-----------------------*\
! DEFINE STRUCTS: !
\*-----------------------*/
bwc_gl_ctrl *control;
bwc_gl_inf *info;
/*-----------------------*\
! DEFINE ASSERTIONS: !
\*-----------------------*/
assert(field);
/*--------------------------------------------------------*\
! Save frequently used variables/structures to temporary !
! variables to make the code more readable. !
\*--------------------------------------------------------*/
control = &field->control;
info = field->info;
/*--------------------------------------------------------*\
! Set the specified codeblock values for all valid dimen- !
! sions taking the maximum allowable size into account. !
\*--------------------------------------------------------*/
control->cbX = (info->nX >> 1) ? (cbX ? cbX : 5) : 0;
control->cbY = (info->nY >> 1) ? (cbY ? cbY : 5) : 0;
control->cbZ = (info->nZ >> 1) ? (cbZ ? cbZ : 5) : 0;
control->cbTS = (info->nTS >> 1) ? (cbTS ? cbTS : 5) : 0;
/*--------------------------------------------------------*\
! Check validity of the codeblock size and reset them, if !
! necessary to teir standard values. !
\*--------------------------------------------------------*/
if((control->cbX > 10) || (control->cbY > 10) || (control->cbZ > 10) || (control->cbTS > 10)||
((control->cbX + control->cbY + control->cbZ + control->cbTS) < 4) ||
((control->cbX + control->cbY + control->cbZ + control->cbTS) > 20))
{
fprintf(stderr, "o==========================================================o\n"\
"| WARNING: Invalid codeblock size |\n"\
"| |\n"\
"| The maximum acceptable codeblock size is 2^20 |\n"\
"| with a maximum allowable number of datapoints |\n"\
"| in each dimension of 2^10. The smallest valid |\n"\
"| codeblock size is 2^4. |\n"\
"| |\n"\
"o==========================================================o\n");
control->cbX = (info->nX >> 1) ? 5 : 0;
control->cbY = (info->nY >> 1) ? 5 : 0;
control->cbZ = (info->nZ >> 1) ? 5 : 0;
control->cbTS = (info->nTS >> 1) ? 5 : 0;
return;
}
/*--------------------------------------------------------*\
! Record the setting of the codeblock size variables in !
! the CSsgc variable. !
\*--------------------------------------------------------*/
control->CSsgc |= (0x01 << 7);
}
/*------------------------------------------------------------------------------------------------*\
! !
! DESCRIPTION: !
! ------------ !
! !
! This function amends the Q number formate range in the bwc_field structure !
! according to the specified value. !
! !
! RETURN: !
! ------- !
! !
! - !
! !
\*------------------------------------------------------------------------------------------------*/
void
bwc_set_qm(bwc_field *const field,
uint8 const Qm)
{
/*-----------------------*\
! DEFINE ASSERTIONS: !
\*-----------------------*/
assert(field);
/*--------------------------------------------------------*\
! Check validity of the specified Qm ammend its value and !
! the CSsgc flag accordingly. !
\*--------------------------------------------------------*/
if((int8)(PREC_BIT - Qm) < 1)
{
fprintf(stderr, "o==========================================================o\n"\
"| WARNING: Invalid Q number formate range |\n"\
"| |\n"\
"| The specified Q number formate range is larger |\n");
#ifdef BWC_SINGLE_PRECISION
fprintf(stderr, "| than the permitted 30 bits. |\n");
#else
fprintf(stderr, "| than the permitted 62 bits. |\n");
#endif
fprintf(stderr, "| |\n"\
"o==========================================================o\n");
}
else
{
control->Qm = Qm;
control->CSsgc |= (0x01 << 8);
}
}
/*------------------------------------------------------------------------------------------------*\
! !
! DESCRIPTION: !
! ------------ !
! !
! This function amends the tileSize and num_Tiles values in the bwc_field struc- !
! ture according to the specified values. The NUMBEROF and SIZEOF constants can be !
! used to either specify the tile sizes or the number of tiles in each spatial and !
! temporal directions. !
! !
! RETURN: !
! ------- !
! !
! - !
! !
\*------------------------------------------------------------------------------------------------*/
void
bwc_set_tiles(bwc_field *const field,
uint64 const *const tilesX,
uint64 const *const tilesY,
uint64 const *const tilesZ,
uint16 const *const tilesTS,
bwc_tile_instr const instr)
{
/*-----------------------*\
! DEFINE INT VARIABLES: !
\*-----------------------*/
uint64 num_tiles_X, num_tiles_Y, num_tiles_Z;
uint16 num_tiles_TS;
/*-----------------------*\
! DEFINE STRUCTS: !
\*-----------------------*/
bwc_gl_ctrl *control;
bwc_gl_inf *info;
/*-----------------------*\
! DEFINE ASSERTIONS: !
\*-----------------------*/
assert(field);
assert(instr == bwc_tile_sizeof || instr == bwc_tile_numbof);
/*--------------------------------------------------------*\
! Save the global control and info structure to temporary !
! variables to make the code more readable. !
\*--------------------------------------------------------*/
control = &field->control;
info = field->info;
/*--------------------------------------------------------*\
! Check if the size of one tile or the overall number of !
! tiles are defined. !
\*--------------------------------------------------------*/
if(instr == bwc_tile_sizeof)
{
/*--------------------------------------------------------*\
! Check if the tile sizes have valid values. !
\*--------------------------------------------------------*/
if((control->tileSizeX < 16 && control->tileSizeX > info->nX)||
(control->tileSizeY < 16 && control->tileSizeY > info->nY)||
(control->tileSizeZ < 16 && control->tileSizeZ > info->nZ)||
(control->tileSizeTS < 16 && control->tileSizeTS > info->nTS))
{
fprintf(stderr,"o==========================================================o\n"\
"| WARNING: Invalid Tile Dimensions |\n"\
"| |\n"\
"| One or more of the specified tile dimensions |\n"\
"| has a value that falls outside of its valid |\n"\
"| range. Please verify that all tile dimension |\n"\
"| are within the range of: |\n"\
"| |\n"\
"| 16 ≤ Tile_Size_Xi ≤ Grid_Points_Xi |\n"\
"| |\n"\
"o==========================================================o\n");
return;
}
/*--------------------------------------------------------*\
! Check if the tile dimensions are specified for a valid !
! spatial or temporal dimension. All invalid and unspeci- !
! fied (NULL) values are set to the maximum allowable tile !
! size. !
\*--------------------------------------------------------*/
control->tileSizeX = (info->nX >> 1) ? (tilesX ? tilesX : info->nX) : info->nX;
control->tileSizeY = (info->nY >> 1) ? (tilesY ? tilesY : info->nY) : info->nY;
control->tileSizeZ = (info->nZ >> 1) ? (tilesZ ? tilesZ : info->nZ) : info->nZ;
control->tileSizeTS = (info->nTS >> 1) ? (tilesTS ? tilesTS : info->nTS) : info->nTS;
/*--------------------------------------------------------*\
! Calculate the number of tiles in all spatial and tempo- !
! ral directions and the overall number of tiles. !
\*--------------------------------------------------------*/
num_tiles_X = (uint64)ceil(((float)info->nX / control->tileSizeX));
num_tiles_Y = (uint64)ceil(((float)info->nY / control->tileSizeY));
num_tiles_Z = (uint64)ceil(((float)info->nZ / control->tileSizeZ));
num_tiles_TS = (uint16)ceil(((float)info->nTS/ control->tileSizeTS));
control->nTiles = num_tiles_X * num_tiles_Y * num_tiles_Z * num_tiles_TS;
/*--------------------------------------------------------*\
! Check if the number of tiles exceeds its maximum allowa- !
! ble value. !
\*--------------------------------------------------------*/
if(((double)num_tiles_X * num_tiles_Y * num_tiles_Z * num_tiles_TS) > 0xFFFFFFFFFFFFFFFF)
{
fprintf(stderr,"o==========================================================o\n"\
"| WARNING: Invalid Tile Dimensions |\n"\
"| |\n"\
"| The number of tiles exceeds its maxmum allowa- |\n"\
"| ble value. Please adjust all tile dimension so |\n"\
"| that the number of tiles falls within the range |\n"\
"| of: |\n"\
"| Number_of_Tiles < 2^64 |\n"\
"| |\n"\
"o==========================================================o\n");
/*--------------------------------------------------------*\
! Reset the tile sizes to their standard values. !
\*--------------------------------------------------------*/
control->tileSizeX = info->nX;
control->tileSizeY = info->nY;
control->tileSizeZ = info->nZ;
control->tileSizeTS = info->nTS;
return;
}
}
else if(bwc_tile_numbof)
{
/*--------------------------------------------------------*\
! Check if the number of tiles exceeds its maximum allowa- !
! ble value. !
\*--------------------------------------------------------*/
if(((double)tilesX * tilesY * tilesZ * tilesTS) > 0xFFFFFFFFFFFFFFFF)
{
fprintf(stderr,"o==========================================================o\n"\
"| WARNING: Invalid Number Of Tiles |\n"\
"| |\n"\
"| The number of tiles exceeds its maxmum allowa- |\n"\
"| ble value of: |\n"\
"| |\n"\
"| Number_of_Tiles < 2^64 |\n"\
"| |\n"\
"o==========================================================o\n");
return;
}
/*--------------------------------------------------------*\
! Check if the number of tiles are specified for a valid !
! spatial or temporal dimension. For all invalid and un- !
! specified (NULL) values the corresponding tile size is !
! set to its maximum allowable value. For all valid values !
! the tile sizes are calculated accordingly. !
\*--------------------------------------------------------*/
control->tileSizeX = (info->nX >> 1) ? (tilesX ? (uint64)ceil(((float)info->nX / tilesX)) : info->nX) : info->nX;
control->tileSizeY = (info->nY >> 1) ? (tilesY ? (uint64)ceil(((float)info->nY / tilesY)) : info->nY) : info->nY;
control->tileSizeZ = (info->nZ >> 1) ? (tilesZ ? (uint64)ceil(((float)info->nZ / tilesZ)) : info->nZ) : info->nZ;
control->tileSizeTS = (info->nTS >> 1) ? (tilesTS ? (uint16)ceil(((float)info->nTS/ tilesTS)) : info->nTS) : info->nTS;
/*--------------------------------------------------------*\
! Check if the tile sizes have valid values. !
\*--------------------------------------------------------*/
if((control->tileSizeX < 16 && control->tileSizeX > info->nX)||
(control->tileSizeY < 16 && control->tileSizeY > info->nY)||
(control->tileSizeZ < 16 && control->tileSizeZ > info->nZ)||
(control->tileSizeTS < 16 && control->tileSizeTS > info->nTS))
{
fprintf(stderr,"o==========================================================o\n"\
"| WARNING: Invalid Number Of Tiles |\n"\
"| |\n"\
"| One or more of the tile dimensions has a value |\n"\
"| that falls outside of its valid range. Please |\n"\
"| verify that the number of tiles for all dimen- |\n"\
"| sions are set so that the corresponding tile |\n"\
"| sizes fall within the range of: |\n"\
"| |\n"\
"| 16 ≤ Tile_Size_Xi ≤ Grid_Points_Xi |\n"\
"| |\n"\
"o==========================================================o\n");
/*--------------------------------------------------------*\
! Reset the tile sizes to their standard values. !
\*--------------------------------------------------------*/
control->tileSizeX = info->nX;
control->tileSizeY = info->nY;
control->tileSizeZ = info->nZ;
control->tileSizeTS = info->nTS;
return;
}
/*--------------------------------------------------------*\
! Reevaluate the number of tiles in all spatial and tempo- !
! ral directions and the overall number of tiles. !
\*--------------------------------------------------------*/
num_tiles_X = (uint64)ceil(((float)info->nX / control->tileSizeX));
num_tiles_Y = (uint64)ceil(((float)info->nY / control->tileSizeY));
num_tiles_Z = (uint64)ceil(((float)info->nZ / control->tileSizeZ));
num_tiles_TS = (uint16)ceil(((float)info->nTS/ control->tileSizeTS));
control->nTiles = num_tiles_X * num_tiles_Y * num_tiles_Z * num_tiles_TS;
}
/*--------------------------------------------------------*\
! Record the setting of the tile size variables in the !
! CSsgc variable. !
\*--------------------------------------------------------*/
control->CSsgc |= (0x01 << 9);
}

File diff suppressed because it is too large Load diff