{"id":6759,"date":"2014-12-14T11:17:33","date_gmt":"2014-12-13T17:17:33","guid":{"rendered":"http:\/\/www.moonmile.net\/blog\/?p=6759"},"modified":"2014-12-14T16:08:01","modified_gmt":"2014-12-14T07:08:01","slug":"f-%e3%81%8b%e3%82%89-fortarn-%e3%81%ae%e9%96%a2%e6%95%b0%e3%82%92%e5%91%bc%e3%81%b3%e5%87%ba%e3%81%9d%e3%81%86","status":"publish","type":"post","link":"http:\/\/www.moonmile.net\/blog\/archives\/6759","title":{"rendered":"F# \u304b\u3089 Fortarn \u306e\u95a2\u6570\u3092\u547c\u3073\u51fa\u305d\u3046"},"content":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u306f F# Advent Calendar 2014 \u306e 14\u65e5\u76ee\u306e\u8a18\u4e8b\u3067\u3059\u3002\u4eca\u56de\u306f\u82f1\u8a9e\u7248\u3082\u3042\u308b\u305d\u3046\u3067\u3001\u4ee5\u4e0b\u304b\u3089\u8fbf\u3063\u3066\u3044\u304f\u3068\u82f1\u8a9e\u7248\u306e F# Advent \u306b\u305f\u3069\u308a\u7740\u3051\u307e\u3059\uff08\u5f53\u7136\u3001\u4e2d\u8eab\u304c\u82f1\u8a9e\u3067\u3059\u306d\uff09\u3002<\/p>\n<p>F# Advent Calendar 2014 &#8211; connpass<br \/>\n<a href=\"http:\/\/connpass.com\/event\/9758\/\">http:\/\/connpass.com\/event\/9758\/<\/a><br \/>\nF# Advent Calendar in English 2014 | Sergey Tihon&#8217;s Blog<br \/>\n<a href=\"http:\/\/sergeytihon.wordpress.com\/2014\/11\/24\/f-advent-calendar-in-english-2014\/\">http:\/\/sergeytihon.wordpress.com\/2014\/11\/24\/f-advent-calendar-in-english-2014\/<\/a><\/p>\n<p>\u3055\u3066\u3001\u53bb\u5e74\u306f <a href=\"http:\/\/www.moonmile.net\/blog\/archives\/5277\">F#\u3068Fortran\u306e\u8a71\u2026\u306e\u305d\u306e\u524d\u306b<\/a> \u3068\u3044\u3046\u306e\u3092\u66f8\u3044\u3066\u3001\u3042\u3048\u306a\u304f\u632b\u6298\u3057\u305f\u30ef\u30bf\u30af\u30b7\u3067\u3059\u304c\u3001\u4eca\u56de\u306f F# \u304b\u3089 Fortran \u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u306b\u6210\u529f\u81f4\u3057\u307e\u3057\u305f\u30c3!!! \u3063\u3066\u3001\u8ab0\u5f97\u306a\u6280\u8853\u60c5\u5831\u306a\u306e\u3067\u3059\u304c\u3001\u3044\u3061\u304a\u3046\u3001\u982d\u304c F \u3064\u306a\u304c\u308a\u3068\u3044\u3046\u30cd\u30bf\u8a18\u4e8b\u306a\u306e\u3067\u3001\u304a\u8a31\u3057\u3092\uff08\u7b11\uff09\u3002<\/p>\n<h2>Fortarn \u3067 DLL \u3092\u4f5c\u6210\u3059\u308b<\/h2>\n<p>DLL \u306f Intel Visual Fortran 2013 \u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2014\/12\/wpid-dworkblogimage20141214_01org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2014\/12\/wpid-dworkblogimage20141214_01thum.jpg\" border=\"0\" \/><\/a><\/p>\n<p>Intel \u306e Fortran \u3067\u306f\u3001DLL \u3092\u4f5c\u6210\u3067\u304d\u3066\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u300c!DEC$ ATTRIBUTES DLLEXPORT::&lt;\u516c\u958b\u540d&gt;\u300d\u306e\u3088\u3046\u306b\u3001DLL \u3067\u516c\u958b\u3059\u308b\u95a2\u6570\u3092\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002gcc \u306b\u3082 fortran \u304c\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u305d\u3063\u3061\u306e\u307b\u3046\u306f\u30b9\u30bf\u30c6\u30a3\u30c3\u30af\u30e9\u30a4\u30d6\u30e9\u30ea\u3057\u304b\u4f5c\u3063\u305f\u3053\u3068\u304c\u306a\u304f\u3066\u3001\u3088\u304f\u308f\u304b\u308a\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3001linux \u4e0a\u3067\u52d5\u304b\u3059\u306e\u306a\u3089\u3070 *.so \u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u3063\u3066\u305d\u306e\u307e\u307e C \u8a00\u8a9e\u304b\u3089\u4f7f\u3048\u308b\u3088\u3046\u306b\u3067\u304d\u308b\u306e\u3067\u3001\u304a\u305d\u3089\u304f F# \u304b\u3089\u3082\u4f3c\u305f\u3088\u3046\u306a\u5f62\u3067\u4f5c\u308c\u308b\u3067\u3057\u3087\u3046\u3002<br \/>\n\u307e\u3042\u3001Windows \u4e0a\u306a\u3089\u3070 DLL \u306a\u306e\u3067\u3001\u3053\u306e\u30b9\u30bf\u30a4\u30eb\u3067\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n! \u6570\u5024\u3092\u6e21\u3059\u7c21\u5358\u306a\u30d1\u30bf\u30fc\u30f3\r\ninteger function add1( a, b )\r\n    !DEC$ ATTRIBUTES DLLEXPORT::ADD1\r\n    integer, intent(in) :: a, b\r\n    integer :: total\r\n\r\n    total = a + b\r\n    add1  = total\r\nend function add1\r\n\r\n! \uff11\u6b21\u5143\u914d\u5217\u3092\u6e21\u3059\r\ninteger function sum1( v, count )\r\n    !DEC$ ATTRIBUTES DLLEXPORT::SUM1\r\n    integer, intent(in) :: v(10)\r\n    integer, intent(in) :: count\r\n    integer :: i, total\r\n\r\n    total = 0\r\n    do i=1,count\r\n        print *, 'in sum1: ', i, v(i)\r\n        total = total + v(i)\r\n    end do\r\n    sum1 = total\r\n    end function sum1\r\n\r\n! \u4e8c\u6b21\u5143\u914d\u5217\u3092\u6e21\u3059\r\ninteger function sum2( v, cnti, cntj )\r\n    !DEC$ ATTRIBUTES DLLEXPORT::SUM2\r\n    integer :: v(3,4)\r\n    integer :: cnti, cntj\r\n    integer :: i,j\r\n    integer :: total\r\n\r\n    total = 0\r\n    do j=1,cntj\r\n        do i=1,cnti\r\n            print *,i,j,v(i,j)\r\n            total = total + v(i,j)\r\n        end do\r\n    end do\r\n    sum2 = total\r\nend function sum2\r\n<\/pre>\n<p>Fortran \u306e\u4e2d\u8eab\u304c\u30c1\u30fc\u30d7\u3059\u304e\u307e\u3059\u304c\u3001\u6570\u5024\uff08int\u578b\uff09\u3068\u914d\u5217\u3092\u8a66\u3057\u3066\u307e\u3059\u3002\u3042\u3068\u5b9f\u7528\u7684\u306b\u3059\u308b\u306b\u306f\u3001double, float \u3042\u305f\u308a\u3092\u8a66\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u306d\u3002<\/p>\n<h2>\u307e\u305a\u306f\u3001\u8a66\u3057\u306b C++ \u304b\u3089\u547c\u3073\u51fa\u3059<\/h2>\n<p>\u52d5\u4f5c\u78ba\u8a8d\u3092\u3059\u308b\u305f\u3081\u306b C++ \u304b\u3089\u547c\u3073\u51fa\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002Fortran \u304b\u3089\u516c\u958b\u3055\u308c\u308c\u308b DLL \u95a2\u6570\u306f\u3001dllimport \u3092\u4f7f\u3063\u3066\u547c\u3073\u51fa\u305b\u308b\u306e\u3067\u3059\u304c\u3001\u5024\u3092\u6e21\u3059\u3068\u3053\u308d\u304c\u30dd\u30a4\u30f3\u30bf\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3053\u308d\u304c\u6ce8\u610f\u3057\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u3002\u3053\u308c Fortran \u306e\u95a2\u6570\u6e21\u3057\u304c\u30b9\u30bf\u30c3\u30af\u7d4c\u7531\u3067\u306f\u306a\u304f\u3066\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u7d4c\u7531\u3060\u304b\u3089\u306a\u3093\u3067\u3059\u3088\u306d\u3002C \u8a00\u8a9e\u306e\u5834\u5408\u30b9\u30bf\u30c3\u30af\u306b\u5024\u3092\u7a4d\u3093\u3067\u6e21\u3057\u307e\u3059\uff08C#\u306a\u3069\u306e.NET\u8a00\u8a9e\u304b\u3089\u6e21\u3059\u3068\u304d\u3082\u540c\u3058\uff09\u304c\u3001Fortran \u306b\u6e21\u3059\u3068\u304d\u306f\u3001\u3053\u308c\u306b\u6ce8\u610f\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3068\u3044\u3046\u3001\u5909\u306a\u611f\u3058\u306a\u306e\u3067\u3059\u3002\u307e\u3042\u3001Fortran \u3060\u3051\u3067\u3084\u3063\u3066\u3044\u308b\u3068\u304d\u306f\u3001\u3042\u3093\u307e\u308a\u8003\u616e\u3057\u306a\u304f\u3066\u3088\u304f\u3066\u4fbf\u5229\uff08\u3067\u304b\u3044\u914d\u5217\u3092\u305d\u306e\u307e\u307e\u6e21\u3059\u3068\u304b\uff09\u306a\u306e\u3067\u3001\u826f\u3057\u60aa\u3057\u3068\u3044\u3046\u3053\u3068\u3067\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n#include &amp;quot;stdafx.h&amp;quot;\r\n#include &lt;iostream&gt;\r\n\r\n#define DllImport __declspec( dllimport )\r\n\r\nextern &amp;quot;C&amp;quot; {\r\n\tDllImport int ADD1(const int *, const int *);\r\n\tDllImport int SUM1( int(*)&#x5B;] , const int *);\r\n\tDllImport int SUM2(int(*)&#x5B;4]&#x5B;3], const int *, const int *);\r\n}\r\n\r\nint _tmain(int argc, _TCHAR* argv &#x5B;])\r\n{\r\n\tint x = 10;\r\n\tint y = 20;\r\n\tint ans = ADD1(&amp;x, &amp;y);\r\n\tstd::cout &lt;&lt; &amp;quot;ans &amp;quot; &lt;&lt; ans &lt;&lt; std::endl;\r\n\r\n\tint  v&#x5B;] = { 1, 2, 3, 4, 5 };\r\n\tint cnt = 5;\r\n\tint ans2 = SUM1((int(*)&#x5B;])&amp;v, &amp;cnt);\r\n\tstd::cout &lt;&lt; &amp;quot;ans2 &amp;quot; &lt;&lt; ans2 &lt;&lt; std::endl;\r\n\r\n\tint v2&#x5B;]&#x5B;3] = {\r\n\t\t{1,2,3},\r\n\t\t{11,22,33},\r\n\t\t{10,20,30},\r\n\t\t{100,200,300}\r\n\t};\r\n\tint cnti = 3;\r\n\tint cntj = 4;\r\n\tint ans3 = SUM2( &amp;v2, &amp;cnti, &amp;cntj);\r\n\tstd::cout &lt;&lt; &amp;quot;ans3 &amp;quot; &lt;&lt; ans3 &lt;&lt; std::endl;\r\n\r\n\treturn 0;\r\n}\r\n<\/pre>\n<p>\u5b9f\u884c\u3059\u308b\u3068\u3001\u3053\u3093\u306a\u611f\u3058\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2014\/12\/wpid-dworkblogimage20141214_02org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2014\/12\/wpid-dworkblogimage20141214_02thum.jpg\" border=\"0\" \/><\/a><\/p>\n<h2>C# \u304b\u3089\u547c\u3073\u51fa\u3057\u3066\u307f\u308b<\/h2>\n<p>\u3053\u308c\u3092 C# \u3067\u66f8\u304d\u76f4\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002DllImport \u3092\u4f7f\u3046\u306e\u306f\u5206\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001int \u306e\u30dd\u30a4\u30f3\u30bf\u3092\u6e21\u3055\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u3067\u3001ref \u3092\u4f7f\u3044\u307e\u3059\u3002\u95a2\u6570\u306e\u547c\u3073\u51fa\u3057\u5f62\u5f0f\u306f\u3001\u660e\u793a\u7684\u306b CallingConvention = CallingConvention.Cdecl \u3092\u5b9a\u7fa9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nclass Program\r\n{\r\n\t&#x5B;DllImport(&quot;FModule.dll&quot;, CallingConvention = CallingConvention.Cdecl)]\r\n\textern static int SUM1(&#x5B;In] int&#x5B;] v, &#x5B;In] ref int count);\r\n\t&#x5B;DllImport(&quot;FModule.dll&quot;, CallingConvention = CallingConvention.Cdecl)]\r\n\textern static int SUM2(&#x5B;In] int&#x5B;,] v, &#x5B;In] ref int cnti, &#x5B;In] ref int cntj);\r\n\t&#x5B;DllImport(&quot;FModule.dll&quot;, CallingConvention = CallingConvention.Cdecl)]\r\n\textern static int ADD1(&#x5B;In] ref int a, &#x5B;In] ref int b);\r\n\r\n\tstatic void Main(string&#x5B;] args)\r\n\t{\r\n\t\tint a = 10;\r\n\t\tint b = 20;\r\n\t\tint ans = ADD1(ref a, ref b);\r\n\t\tConsole.WriteLine(&quot;ans {0}&quot;, ans);\r\n\r\n\t\tint&#x5B;] v = { 1, 2, 3, 4, 5 };\r\n\t\tint cnt = v.Length;\r\n\t\tint ans2 = SUM1(v, ref cnt);\r\n\t\tConsole.WriteLine(&quot;ans2 {0}&quot;, ans2);\r\n\t\t\/*\r\n\t\tint&#x5B;]&#x5B;] v2 = {\r\n\t\t\t\t\t\t\tnew int&#x5B;]{1,2,3,4},\r\n\t\t\t\t\t\t\tnew int&#x5B;]{11,22,33,44},\r\n\t\t\t\t\t\t\tnew int&#x5B;]{10,20,30,40},\r\n\t\t\t\t\t\t};\r\n\t\t*\/\r\n\t\tint&#x5B;,] v2 = {\r\n\t\t\t\t\t\t{1,2,3},\r\n\t\t\t\t\t\t{11,22,33},\r\n\t\t\t\t\t\t{10,20,30},\r\n\t\t\t\t\t\t{100,200,300},\r\n\t\t\t\t\t};\r\n\t\tint cnti = 3;\r\n\t\tint cntj = 4;\r\n\t\tint ans3 = SUM2(v2, ref cnti, ref cntj);\r\n\t\tConsole.WriteLine(&quot;ans3 {0}&quot;, ans3);\r\n\t}\r\n<\/pre>\n<p>2\u6b21\u5143\u914d\u5217\u3092\u6e21\u3059\u3068\u304d\u306f\u3001int[][] \u3067\u306f\u306a\u304f\u3066 int[,] \u3092\u4f7f\u3044\u307e\u3059 C++ \u3084 Fortran \u3068\u540c\u3058\u3088\u3046\u306b\u9023\u7d9a\u3057\u305f\u30e1\u30e2\u30ea\u306b int \u5024\u304c\u914d\u7f6e\u3055\u308c\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u3067\u3059\u3002ADD1 \u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u3068\u304d\u306b ref \u3092\u4ed8\u3051\u308b\u306e\u304c\u9762\u5012\u306a\u306e\u3067\u3059\u304c\u3001\u3053\u308c\u3067 Fortran \u306e DLL \u3092\u6b63\u3057\u304f\u547c\u3073\u51fa\u305b\u307e\u3059\u3002<\/p>\n<h2>F# \u304b\u3089\u547c\u3073\u51fa\u3057\u3066\u307f\u308b<\/h2>\n<p>\u66f4\u306b F# \u306b\u66f8\u304d\u63db\u3048\u3066\u307f\u307e\u3057\u3087\u3046\u3002dll \u304b\u3089 export \u3055\u308c\u3066\u3044\u308b\u30dd\u30a4\u30f3\u30bf\u306f int&amp; \u306e\u3088\u3046\u306b\u5ba3\u8a00\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nopen System\r\nopen System.Runtime.InteropServices\r\n\r\ntype ARY2D = int&#x5B;,]\r\n\r\n&#x5B;&lt;AutoOpen&gt;]\r\nmodule FDLL =\r\n  &#x5B;&lt;DllImport(&amp;quot;FModule.dll&amp;quot;, CallingConvention = CallingConvention.Cdecl)&gt;]\r\n  extern int ADD1(int&amp; a, int&amp; b)\r\n  &#x5B;&lt;DllImport(&amp;quot;FModule.dll&amp;quot;, CallingConvention = CallingConvention.Cdecl)&gt;]\r\n  extern int SUM1(int&#x5B;] v, int&amp; count )\r\n  \/\/ int&#x5B;,] \u304c\u305d\u306e\u307e\u307e\u3067\u306f\u6e21\u305b\u306a\u3044\u306e\u3067 alias \u3092\u4f5c\u3063\u3066\u6307\u5b9a\u3059\u308b\r\n  &#x5B;&lt;DllImport(&amp;quot;FModule.dll&amp;quot;, CallingConvention = CallingConvention.Cdecl)&gt;]\r\n  \/\/ extern int SUM2(int&#x5B;,] v, int&amp; cnti, int&amp; cnt2 )\r\n  extern int SUM2(ARY2D v, int&amp; cnti, int&amp; cnt2 )\r\n\r\nlet mutable a = 10\r\nlet mutable b = 20\r\nlet ans = ADD1( &amp;a , &amp;b )\r\n\r\nConsole.WriteLine( &amp;quot;ans {0}&amp;quot;, ans )\r\n\r\nlet mutable v = &#x5B;|1;2;3;4;5|]\r\nlet mutable cnt = v.Length\r\nlet ans2 = SUM1( v, &amp;cnt )\r\n\r\nConsole.WriteLine( &amp;quot;ans2 {0}&amp;quot;, ans2 )\r\n\r\n\/\/ \u4e8c\u6b21\u5143\u914d\u5217\u306f Array2D \u3067\u4f5c\u308b\r\nlet vv = &#x5B;|\r\n    &#x5B;|1;2;3|];\r\n    &#x5B;|11;22;33|];\r\n    &#x5B;|10;20;30|];\r\n    &#x5B;|100;200;300|];\r\n  |]\r\nlet v2 = Array2D.init 4 3 ( fun i j -&gt; vv.&#x5B;i].&#x5B;j])\r\n\r\nlet mutable cnti = 3\r\nlet mutable cntj = 4\r\nlet ans3 = SUM2( v2, &amp;cnti, &amp;cntj )\r\n\r\nConsole.WriteLine( &amp;quot;ans3 {0}&amp;quot;, ans3 )\r\n<\/pre>\n<p>C# \u3068\u6bd4\u3079\u3066\u7c21\u7d20\u306b\u66f8\u3051\u308b&#8230;\u307b\u3069\u3067\u306f\u306a\u304f\u3066\u3001\u3042\u307e\u308a\u5909\u308f\u308a\u307e\u305b\u3093\u306d\u3002\u305d\u308c\u3088\u308a\u3082\u3001\u6c17\u306b\u306a\u308b\u306e\u306f const \u3067\u6e21\u3057\u305f\u3044\u306e\u306b let mutable \u3092\u4f7f\u308f\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3068\u3053\u308d\u3067\u3059\u3002\u3053\u308c\u306f Fortran \u306e\u547c\u3073\u51fa\u3057\u306e\u5236\u7d04\u3067\u3001\u5024\u306e\u30dd\u30a4\u30f3\u30bf\u3092\u6e21\u3059\u305f\u3081\u306b\u3001\u5185\u5bb9\u304c\u5909\u66f4\u3055\u308c\u306a\u304f\u3066\u3082 a \u306e\u5909\u6570\u306f mutable \u306b\u3057\u306a\u3044\u3068\u6e21\u305b\u306a\u3044\u306e\u3067\u3059\u3002\u3053\u3053\u306f\u3072\u3068\u5de5\u592b\u3057\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u3002\u305b\u3063\u304b\u304f\u306e immutable \u306a\u5024\u306a\u306e\u306b\u3001\u3063\u3066\u3068\u3053\u308d\u3067\u3059\u3002<br \/>\n\u3042\u3068\u3001C# \u3067\u306e2\u6b21\u5143\u914d\u5217 int[,] \u3092 F# \u3067\u3069\u3046\u3084\u3063\u3066\u66f8\u304f\u306e\u304b\u4e0d\u660e\u3060\u3063\u305f\u306e\u3067&#8230;\u3059\u304c\u3001\u65b9\u6cd5\u304c\u89e3\u308a\u307e\u3057\u305f\u3002Array2D \u3092\u4f7f\u3046\u3068 int[,] \u76f8\u5f53\u306a\u3082\u306e\u304c\u4f5c\u308c\u307e\u3059\u3002\u3053\u308c\u3067\u3001\u3082\u3046\u4e00\u5de5\u592b\u5fc5\u8981\u306a\u306e\u306f extern \u3059\u308b\u3068\u304d\u306b int[,] \u3067\u578b\u6307\u5b9a\u304c\u3067\u304d\u306a\u3044\u306e\u3067\u3001alias \u3092\u4f5c\u308a\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001ARY2D \u3068\u3044\u3046\u578b alias \u3092\u4f5c\u3063\u3066 extern int SUM2( ARY2D v, &#8230; ) \u3068\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u3046\u3059\u308b\u3068\u3001C++ \u3068\u540c\u3058\u3088\u3046\u306b2\u6b21\u5143\u914d\u5217\u3068\u3057\u3066\u6e21\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u884c\u3057\u305f\u7d50\u679c\u306f 2\u6b21\u5143\u914d\u5217\u306e\u5411\u304d\u304c C++ \u3068\u9006\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u307e\u3042\u3001\u3053\u3063\u3061\u306e\u307b\u3046\u304c\u5206\u304b\u308a\u3084\u3059\u3044\u304b\u306a\u3068\u3002Xij \u306e\u307b\u3046\u304c X[j,i] \u3088\u308a\u3082\u66f8\u304d\u3084\u3059\u3044\u304b\u306a\u3068\u601d\u3044\u307e\u3059\uff08\u3044\u3084\u3001\u5358\u7d14\u306b\u9806\u756a\u3092\u9593\u9055\u3048\u305f\u3060\u3051\u306a\u3093\u3067\u3059\u3051\u3069\u306d\uff09\u3002<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2014\/12\/wpid-dworkblogimage20141214_03org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2014\/12\/wpid-dworkblogimage20141214_03thum.jpg\" border=\"0\" \/><\/a><\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u3068\u3044\u3046\u308f\u3051\u3067\u30011\u5e74\u8d8a\u3057\u306e\u6848\u4ef6\uff1f\u3068\u3057\u3066\u3001F# \u304b\u3089 Fortran \u3092\u6271\u3046\u30cd\u30bf\u8a18\u4e8b\u304c\u3067\u304d\u307e\u3057\u305f\u3002\u3053\u308c\u3067\u3001\u65e2\u5b58\u306e Fortran \u30e9\u30a4\u30d6\u30e9\u30ea\u3092 F# \u304b\u3089\u4f5c\u3063\u305f\u30a2\u30d7\u30ea\u304c\u4f5c\u308c\u307e\u3059\u306d&#8230;\u3063\u3066\u3044\u3046\u304b\u3001\u8ab0\u5f97\u306a\u6280\u8853\u60c5\u5831\u306a\u306e\u3067\u3059\u304c\u3001\u3044\u3084\u3042\u3001\u3084\u3063\u3066\u307f\u305f\u304b\u3063\u305f\u3068\u3044\u3046\u3053\u3068\u3067\u3002\u7686\u69d8\u3001\u3088\u3044\u30af\u30ea\u30b9\u30de\u30b9\u3092\u30c3!!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u306f F# Advent Calendar 2014 \u306e 14\u65e5\u76ee\u306e\u8a18\u4e8b\u3067\u3059\u3002\u4eca\u56de\u306f\u82f1\u8a9e\u7248\u3082\u3042\u308b\u305d\u3046\u3067\u3001\u4ee5\u4e0b\u304b\u3089\u8fbf\u3063\u3066\u3044\u304f\u3068\u82f1\u8a9e\u7248\u306e F# Advent \u306b\u305f\u3069\u308a\u7740\u3051\u307e\u3059\uff08\u5f53\u7136\u3001\u4e2d\u8eab\u304c\u82f1\u8a9e\u3067\u3059\u306d\uff09\u3002 F# Adve &hellip; <a href=\"http:\/\/www.moonmile.net\/blog\/archives\/6759\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[59,43],"tags":[],"class_list":["post-6759","post","type-post","status-publish","format-standard","hentry","category-f","category-fortran"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/6759","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/comments?post=6759"}],"version-history":[{"count":10,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/6759\/revisions"}],"predecessor-version":[{"id":6769,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/6759\/revisions\/6769"}],"wp:attachment":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/media?parent=6759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/categories?post=6759"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/tags?post=6759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}