Changeset 966 for XIOS/trunk/src/generate_interface_impl.hpp
- Timestamp:
- 10/10/16 16:01:11 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/generate_interface_impl.hpp
r932 r966 323 323 { 324 324 oss << " " << name_tmp << " = " << name << "_" << iendl; 325 oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ")" << iendl; 325 oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; 326 oss << "(" << className << "_hdl%daddr, " << name_tmp << ")" << iendl; 326 327 } 327 else oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_)" << iendl; 328 else { oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; 329 oss << "(" << className << "_hdl%daddr, " << name << "_)" << iendl; } 328 330 oss << "ENDIF"; 329 331 } … … 337 339 if (!matchingTypeCFortran<T>()) 338 340 { 339 oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ")" << iendl; 341 oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; 342 oss << "(" << className << "_hdl%daddr, " << name_tmp << ")" << iendl; 340 343 oss << " " << name << "_ = " << name_tmp << iendl; 341 344 } 342 else oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_)" << iendl; 345 else { oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; 346 oss << "(" << className << "_hdl%daddr, " << name << "_)" << iendl; } 343 347 oss << "ENDIF"; 344 348 } … … 349 353 350 354 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; 351 oss << " " << name << "__tmp = cxios_is_defined_" << className << "_" << name << "(" << className << "_hdl%daddr)" << iendl; 355 oss << " " << name << "__tmp = cxios_is_defined_" << className << "_" << name << " &" << iendl; 356 oss << "(" << className << "_hdl%daddr)" << iendl; 352 357 oss << " " << name << "_ = " << name_tmp << iendl; 353 358 oss << "ENDIF"; … … 358 363 { 359 364 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; 360 oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, len(" << name << "_))" << iendl; 365 oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; 366 oss << "(" << className << "_hdl%daddr, " << name << "_, len(" << name << "_))" << iendl; 361 367 oss << "ENDIF"; 362 368 } … … 366 372 { 367 373 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; 368 oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, len(" << name << "_))" << iendl; 374 oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; 375 oss << "(" << className << "_hdl%daddr, " << name << "_, len(" << name << "_))" << iendl; 369 376 oss << "ENDIF"; 370 377 } … … 813 820 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1)))" << iendl; \ 814 821 oss << " " << name_tmp << " = " << name << "_" << iendl; \ 815 oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 822 oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; \ 823 oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 816 824 } \ 817 else oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; \ 825 else { oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; \ 826 oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \ 818 827 oss << "ENDIF"; \ 819 828 } \ … … 829 838 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2)))" << iendl; \ 830 839 oss << " " << name_tmp << " = " << name << "_" << iendl; \ 831 oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 840 oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; \ 841 oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 832 842 } \ 833 else oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; \ 843 else { oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; \ 844 oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \ 834 845 oss << "ENDIF"; \ 835 846 } \ … … 845 856 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3)))" << iendl; \ 846 857 oss << " " << name_tmp << " = " << name << "_" << iendl; \ 847 oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 858 oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; \ 859 oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 848 860 } \ 849 else oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; \ 861 else { oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; \ 862 oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \ 850 863 oss << "ENDIF"; \ 851 864 }\ … … 859 872 if (!matchingTypeCFortran<T>()) \ 860 873 { \ 861 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), SIZE(" << name << "_,4)))" << iendl; \ 874 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), &" << iendl; \ 875 oss << " SIZE(" << name << "_,4)))" << iendl; \ 862 876 oss << " " << name_tmp << " = " << name << "_" << iendl; \ 863 oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 877 oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; \ 878 oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 864 879 } \ 865 else oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; \ 880 else { oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; \ 881 oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \ 866 882 oss << "ENDIF"; \ 867 883 }\ … … 875 891 if (!matchingTypeCFortran<T>()) \ 876 892 { \ 877 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), SIZE(" << name << "_,4), SIZE(" << name << "_,5)))" << iendl; \ 893 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), &" << iendl; \ 894 oss << " SIZE(" << name << "_,4), SIZE(" << name << "_,5)))" << iendl; \ 878 895 oss << " " << name_tmp << " = " << name << "_" << iendl; \ 879 oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 896 oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; \ 897 oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 880 898 } \ 881 else oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; \ 899 else { oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; \ 900 oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \ 882 901 oss << "ENDIF"; \ 883 902 }\ … … 891 910 if (!matchingTypeCFortran<T>()) \ 892 911 { \ 893 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), SIZE(" << name << "_,4), SIZE(" << name << "_,5), SIZE(" << name << "_,6)))" << iendl; \ 912 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), &" << iendl; \ 913 oss << " SIZE(" << name << "_,4), SIZE(" << name << "_,5), SIZE(" << name << "_,6)))" << iendl; \ 894 914 oss << " " << name_tmp << " = " << name << "_" << iendl; \ 895 oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 915 oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; \ 916 oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 896 917 } \ 897 else oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; \ 918 else { oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; \ 919 oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \ 898 920 oss << "ENDIF"; \ 899 921 }\ … … 907 929 if (!matchingTypeCFortran<T>()) \ 908 930 { \ 909 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), SIZE(" << name << "_,4), SIZE(" << name << "_,5), SIZE(" << name << "_,6), SIZE(" << name << "_,7)))" << iendl; \ 931 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), &" << iendl; \ 932 oss << " SIZE(" << name << "_,4), SIZE(" << name << "_,5), SIZE(" << name << "_,6), &" << iendl; \ 933 oss << " SIZE(" << name << "_,7)))" << iendl; \ 910 934 oss << " " << name_tmp << " = " << name << "_" << iendl; \ 911 oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 935 oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; \ 936 oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 912 937 } \ 913 else oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; \ 938 else { oss << " CALL cxios_set_" << className << "_" << name << " &" << iendl; \ 939 oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \ 914 940 oss << "ENDIF"; \ 915 941 } … … 931 957 { \ 932 958 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1)))" << iendl; \ 933 oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 959 oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; \ 960 oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 934 961 oss << " " << name << "_ = " << name_tmp << iendl; \ 935 962 } \ 936 else oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; \ 963 else { oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; \ 964 oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \ 937 965 oss << "ENDIF"; \ 938 966 } \ … … 947 975 { \ 948 976 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2)))" << iendl; \ 949 oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 977 oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; \ 978 oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 950 979 oss << " " << name << "_ = " << name_tmp << iendl; \ 951 980 } \ 952 else oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; \ 981 else { oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; \ 982 oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \ 953 983 oss << "ENDIF"; \ 954 984 } \ … … 963 993 { \ 964 994 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3)))" << iendl; \ 965 oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 995 oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; \ 996 oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 966 997 oss << " " << name << "_ = " << name_tmp << iendl; \ 967 998 } \ 968 else oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; \ 999 else { oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; \ 1000 oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \ 969 1001 oss << "ENDIF"; \ 970 1002 } \ … … 978 1010 if (!matchingTypeCFortran<T>()) \ 979 1011 { \ 980 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), SIZE(" << name << "_,4)))" << iendl; \ 981 oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 1012 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), &" << iendl; \ 1013 oss << " SIZE(" << name << "_,4)))" << iendl; \ 1014 oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; \ 1015 oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 982 1016 oss << " " << name << "_ = " << name_tmp << iendl; \ 983 1017 } \ 984 else oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; \ 1018 else { oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; \ 1019 oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; }\ 985 1020 oss << "ENDIF"; \ 986 1021 } \ … … 994 1029 if (!matchingTypeCFortran<T>()) \ 995 1030 { \ 996 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), SIZE(" << name << "_,4), SIZE(" << name << "_,5)))" << iendl; \ 997 oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 1031 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), &" << iendl; \ 1032 oss << " SIZE(" << name << "_,4), SIZE(" << name << "_,5)))" << iendl; \ 1033 oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; \ 1034 oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 998 1035 oss << " " << name << "_ = " << name_tmp << iendl; \ 999 1036 } \ 1000 else oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; \ 1037 else { oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; \ 1038 oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \ 1001 1039 oss << "ENDIF"; \ 1002 1040 }\ … … 1010 1048 if (!matchingTypeCFortran<T>()) \ 1011 1049 { \ 1012 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), SIZE(" << name << "_,4), SIZE(" << name << "_,5), SIZE(" << name << "_,6)))" << iendl; \ 1013 oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 1050 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), &" << iendl; \ 1051 oss << " SIZE(" << name << "_,4), SIZE(" << name << "_,5), SIZE(" << name << "_,6)))" << iendl; \ 1052 oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; \ 1053 oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 1014 1054 oss << " " << name << "_ = " << name_tmp << iendl; \ 1015 1055 } \ 1016 else oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; \ 1056 else { oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; \ 1057 oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \ 1017 1058 oss << "ENDIF"; \ 1018 1059 } \ … … 1026 1067 if (!matchingTypeCFortran<T>()) \ 1027 1068 { \ 1028 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), SIZE(" << name << "_,4), SIZE(" << name << "_,5), SIZE(" << name << "_,6), SIZE(" << name << "_,7)))" << iendl; \ 1029 oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 1069 oss << " ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), &" << iendl; \ 1070 oss << " SIZE(" << name << "_,4), SIZE(" << name << "_,5), SIZE(" << name << "_,6), &" << iendl; \ 1071 oss << " SIZE(" << name << "_,7)))" << iendl; \ 1072 oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; \ 1073 oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \ 1030 1074 oss << " " << name << "_ = " << name_tmp << iendl; \ 1031 1075 } \ 1032 else oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; \ 1076 else { oss << " CALL cxios_get_" << className << "_" << name << " &" << iendl; \ 1077 oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \ 1033 1078 oss << "ENDIF"; \ 1034 1079 }
Note: See TracChangeset
for help on using the changeset viewer.