Back to home page

MITgcm

 
 

    


File indexing completed on 2023-05-28 05:10:57 UTC

view on githubraw file Latest commit b4daa243 on 2023-05-28 03:53:22 UTC
b4daa24319 Shre*0001 #ifndef ADBUFFER_LOADED
                0002 #define ADBUFFER_LOADED 1
                0003 
                0004 #include "OLDadStack.h"
                0005 
                0006 typedef struct {float r,i;} ccmplx ;
                0007 typedef struct {double dr, di;} cdcmplx ;
                0008 
                0009 /** Push an int (4 bytes int) */
                0010 extern void pushInteger4(int x) ;
                0011 
                0012 /** Pop an int (4 bytes int) */
                0013 extern void popInteger4(int *x) ;
                0014 
                0015 /** Push a long (8 bytes int) */
                0016 extern void pushInteger8(long x) ;
                0017 
                0018 /** Pop a long (8 bytes int) */
                0019 extern void popInteger8(long *x) ;
                0020 
                0021 /** Push a float (4 bytes real) */
                0022 extern void pushReal4(float x) ;
                0023 
                0024 /** Pop a float (4 bytes real) */
                0025 extern void popReal4(float *x) ;
                0026 
                0027 /** Push a double (8 bytes real) */
                0028 extern void pushReal8(double x) ;
                0029 
                0030 /** Pop a double (8 bytes real) */
                0031 extern void popReal8(double *x) ;
                0032 
                0033 /** Push a complex (4 bytes per component) */
                0034 extern void pushComplex8(ccmplx x) ;
                0035 
                0036 /** Pop a complex (4 bytes per component) */
                0037 extern void popComplex8(ccmplx *x) ;
                0038 
                0039 /** Push a double complex (8 bytes per component) */
                0040 extern void pushComplex16(cdcmplx x) ;
                0041 
                0042 /** Pop a double complex (8 bytes per component) */
                0043 extern void popComplex16(cdcmplx *x) ;
                0044 
                0045 /** Push a char (byte) */
                0046 extern void pushCharacter(char x) ;
                0047 
                0048 /** Pop a char (byte) */
                0049 extern void popCharacter(char *x) ;
                0050 
                0051 /** Push a boolean (one bit) */
                0052 extern void pushBoolean(int x) ;
                0053 
                0054 /** Pop a boolean (one bit) */
                0055 extern void popBoolean(int *x) ;
                0056 
                0057 /** Push a value ranging in [0,1] */
                0058 extern void pushControl1b(int cc) ;
                0059 
                0060 /** Pop a value ranging in [0,1] */
                0061 extern void popControl1b(int *cc) ;
                0062 
                0063 /** Push a value ranging in [0,3] */
                0064 extern void pushControl2b(int cc) ;
                0065 
                0066 /** Pop a value ranging in [0,3] */
                0067 extern void popControl2b(int *cc) ;
                0068 
                0069 /** Push a value ranging in [0,7] */
                0070 extern void pushControl3b(int cc) ;
                0071 
                0072 /** Pop a value ranging in [0,7] */
                0073 extern void popControl3b(int *cc) ;
                0074 
                0075 /** Push a value ranging in [0,15] */
                0076 extern void pushControl4b(int cc) ;
                0077 
                0078 /** Pop a value ranging in [0,15] */
                0079 extern void popControl4b(int *cc) ;
                0080 
                0081 /** Push a value ranging in [0,31] */
                0082 extern void pushControl5b(int cc) ;
                0083 
                0084 /** Pop a value ranging in [0,31] */
                0085 extern void popControl5b(int *cc) ;
                0086 
                0087 /** Push a value ranging in [0,63] */
                0088 extern void pushControl6b(int cc) ;
                0089 
                0090 /** Pop a value ranging in [0,63] */
                0091 extern void popControl6b(int *cc) ;
                0092 
                0093 /** Push a value ranging in [0,127] */
                0094 extern void pushControl7b(int cc) ;
                0095 
                0096 /** Pop a value ranging in [0,127] */
                0097 extern void popControl7b(int *cc) ;
                0098 
                0099 /** Push a value ranging in [0,255] */
                0100 extern void pushControl8b(int cc) ;
                0101 
                0102 /** Pop a value ranging in [0,255] */
                0103 extern void popControl8b(int *cc) ;
                0104 
                0105 /** Push a 32 bits pointer */
                0106 extern void pushPointer4(void *x) ;
                0107 
                0108 /** Pop a 32 bits pointer */
                0109 extern void popPointer4(void **x) ;
                0110 
                0111 /** Push a 64 bits pointer */
                0112 extern void pushPointer8(void *x) ;
                0113 
                0114 /** Pop a 64 bits pointer */
                0115 extern void popPointer8(void **x) ;
                0116 
                0117 /** From now on, everything below current stack top may be read repeated times.
                0118  * This opens a so-called new repeated-access level */
                0119 extern void adStack_startRepeat() ;
                0120 
                0121 /** Reset the stack top to the deepest enclosing repeated-access level */
                0122 extern void adStack_resetRepeat() ;
                0123 
                0124 /** Return the deepest enclosing repeated-access level to normal stack behavior */
                0125 extern void adStack_endRepeat() ;
                0126 
                0127 /** Display the total amount of memory pushed */
                0128 extern void adStack_showTraffic() ;
                0129 
                0130 /** Display in detail the contents of the AD stack,
                0131  * followed by the detailed contents of each type buffer.
                0132  * Also show the stack of nested repeated-access levels */
                0133 extern void showStackAndBuffers(char *locationName) ;
                0134 
                0135 /** Display the current size of the AD stack as
                0136  * <#blocks.#bytesInTopBlock> then size of each type buffers
                0137  * "pos" will be displayed in front, to help you identify the location. */
                0138 extern void showStackAndBuffersSize(int pos) ;
                0139 
                0140 #endif