{"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<p>[code lang=&#8221;csharp&#8221;]<br \/>\n! \u6570\u5024\u3092\u6e21\u3059\u7c21\u5358\u306a\u30d1\u30bf\u30fc\u30f3<br \/>\ninteger function add1( a, b )<br \/>\n    !DEC$ ATTRIBUTES DLLEXPORT::ADD1<br \/>\n    integer, intent(in) :: a, b<br \/>\n    integer :: total<\/p>\n<p>    total = a + b<br \/>\n    add1  = total<br \/>\nend function add1<\/p>\n<p>! \uff11\u6b21\u5143\u914d\u5217\u3092\u6e21\u3059<br \/>\ninteger function sum1( v, count )<br \/>\n    !DEC$ ATTRIBUTES DLLEXPORT::SUM1<br \/>\n    integer, intent(in) :: v(10)<br \/>\n    integer, intent(in) :: count<br \/>\n    integer :: i, total<\/p>\n<p>    total = 0<br \/>\n    do i=1,count<br \/>\n        print *, &#8216;in sum1: &#8216;, i, v(i)<br \/>\n        total = total + v(i)<br \/>\n    end do<br \/>\n    sum1 = total<br \/>\n    end function sum1<\/p>\n<p>! \u4e8c\u6b21\u5143\u914d\u5217\u3092\u6e21\u3059<br \/>\ninteger function sum2( v, cnti, cntj )<br \/>\n    !DEC$ ATTRIBUTES DLLEXPORT::SUM2<br \/>\n    integer :: v(3,4)<br \/>\n    integer :: cnti, cntj<br \/>\n    integer :: i,j<br \/>\n    integer :: total<\/p>\n<p>    total = 0<br \/>\n    do j=1,cntj<br \/>\n        do i=1,cnti<br \/>\n            print *,i,j,v(i,j)<br \/>\n            total = total + v(i,j)<br \/>\n        end do<br \/>\n    end do<br \/>\n    sum2 = total<br \/>\nend function sum2<br \/>\n[\/code]<\/p>\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<p>[code lang=&#8221;csharp&#8221;]<br \/>\n#include &quot;stdafx.h&quot;<br \/>\n#include &lt;iostream&gt;<\/p>\n<p>#define DllImport __declspec( dllimport )<\/p>\n<p>extern &quot;C&quot; {<br \/>\n\tDllImport int ADD1(const int *, const int *);<br \/>\n\tDllImport int SUM1( int(*)[] , const int *);<br \/>\n\tDllImport int SUM2(int(*)[4][3], const int *, const int *);<br \/>\n}<\/p>\n<p>int _tmain(int argc, _TCHAR* argv [])<br \/>\n{<br \/>\n\tint x = 10;<br \/>\n\tint y = 20;<br \/>\n\tint ans = ADD1(&amp;x, &amp;y);<br \/>\n\tstd::cout &lt;&lt; &quot;ans &quot; &lt;&lt; ans &lt;&lt; std::endl;<\/p>\n<p>\tint  v[] = { 1, 2, 3, 4, 5 };<br \/>\n\tint cnt = 5;<br \/>\n\tint ans2 = SUM1((int(*)[])&amp;v, &amp;cnt);<br \/>\n\tstd::cout &lt;&lt; &quot;ans2 &quot; &lt;&lt; ans2 &lt;&lt; std::endl;<\/p>\n<p>\tint v2[][3] = {<br \/>\n\t\t{1,2,3},<br \/>\n\t\t{11,22,33},<br \/>\n\t\t{10,20,30},<br \/>\n\t\t{100,200,300}<br \/>\n\t};<br \/>\n\tint cnti = 3;<br \/>\n\tint cntj = 4;<br \/>\n\tint ans3 = SUM2( &amp;v2, &amp;cnti, &amp;cntj);<br \/>\n\tstd::cout &lt;&lt; &quot;ans3 &quot; &lt;&lt; ans3 &lt;&lt; std::endl;<\/p>\n<p>\treturn 0;<br \/>\n}<br \/>\n[\/code]<\/p>\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<p>[code lang=&#8221;csharp&#8221;]<br \/>\nclass Program<br \/>\n{<br \/>\n\t[DllImport(&quot;FModule.dll&quot;, CallingConvention = CallingConvention.Cdecl)]<br \/>\n\textern static int SUM1([In] int[] v, [In] ref int count);<br \/>\n\t[DllImport(&quot;FModule.dll&quot;, CallingConvention = CallingConvention.Cdecl)]<br \/>\n\textern static int SUM2([In] int[,] v, [In] ref int cnti, [In] ref int cntj);<br \/>\n\t[DllImport(&quot;FModule.dll&quot;, CallingConvention = CallingConvention.Cdecl)]<br \/>\n\textern static int ADD1([In] ref int a, [In] ref int b);<\/p>\n<p>\tstatic void Main(string[] args)<br \/>\n\t{<br \/>\n\t\tint a = 10;<br \/>\n\t\tint b = 20;<br \/>\n\t\tint ans = ADD1(ref a, ref b);<br \/>\n\t\tConsole.WriteLine(&quot;ans {0}&quot;, ans);<\/p>\n<p>\t\tint[] v = { 1, 2, 3, 4, 5 };<br \/>\n\t\tint cnt = v.Length;<br \/>\n\t\tint ans2 = SUM1(v, ref cnt);<br \/>\n\t\tConsole.WriteLine(&quot;ans2 {0}&quot;, ans2);<br \/>\n\t\t\/*<br \/>\n\t\tint[][] v2 = {<br \/>\n\t\t\t\t\t\t\tnew int[]{1,2,3,4},<br \/>\n\t\t\t\t\t\t\tnew int[]{11,22,33,44},<br \/>\n\t\t\t\t\t\t\tnew int[]{10,20,30,40},<br \/>\n\t\t\t\t\t\t};<br \/>\n\t\t*\/<br \/>\n\t\tint[,] v2 = {<br \/>\n\t\t\t\t\t\t{1,2,3},<br \/>\n\t\t\t\t\t\t{11,22,33},<br \/>\n\t\t\t\t\t\t{10,20,30},<br \/>\n\t\t\t\t\t\t{100,200,300},<br \/>\n\t\t\t\t\t};<br \/>\n\t\tint cnti = 3;<br \/>\n\t\tint cntj = 4;<br \/>\n\t\tint ans3 = SUM2(v2, ref cnti, ref cntj);<br \/>\n\t\tConsole.WriteLine(&quot;ans3 {0}&quot;, ans3);<br \/>\n\t}<br \/>\n[\/code]<\/p>\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<p>[code lang=&#8221;csharp&#8221;]<br \/>\nopen System<br \/>\nopen System.Runtime.InteropServices<\/p>\n<p>type ARY2D = int[,]<\/p>\n<p>[&lt;AutoOpen&gt;]<br \/>\nmodule FDLL =<br \/>\n  [&lt;DllImport(&quot;FModule.dll&quot;, CallingConvention = CallingConvention.Cdecl)&gt;]<br \/>\n  extern int ADD1(int&amp; a, int&amp; b)<br \/>\n  [&lt;DllImport(&quot;FModule.dll&quot;, CallingConvention = CallingConvention.Cdecl)&gt;]<br \/>\n  extern int SUM1(int[] v, int&amp; count )<br \/>\n  \/\/ int[,] \u304c\u305d\u306e\u307e\u307e\u3067\u306f\u6e21\u305b\u306a\u3044\u306e\u3067 alias \u3092\u4f5c\u3063\u3066\u6307\u5b9a\u3059\u308b<br \/>\n  [&lt;DllImport(&quot;FModule.dll&quot;, CallingConvention = CallingConvention.Cdecl)&gt;]<br \/>\n  \/\/ extern int SUM2(int[,] v, int&amp; cnti, int&amp; cnt2 )<br \/>\n  extern int SUM2(ARY2D v, int&amp; cnti, int&amp; cnt2 )<\/p>\n<p>let mutable a = 10<br \/>\nlet mutable b = 20<br \/>\nlet ans = ADD1( &amp;a , &amp;b )<\/p>\n<p>Console.WriteLine( &quot;ans {0}&quot;, ans )<\/p>\n<p>let mutable v = [|1;2;3;4;5|]<br \/>\nlet mutable cnt = v.Length<br \/>\nlet ans2 = SUM1( v, &amp;cnt )<\/p>\n<p>Console.WriteLine( &quot;ans2 {0}&quot;, ans2 )<\/p>\n<p>\/\/ \u4e8c\u6b21\u5143\u914d\u5217\u306f Array2D \u3067\u4f5c\u308b<br \/>\nlet vv = [|<br \/>\n    [|1;2;3|];<br \/>\n    [|11;22;33|];<br \/>\n    [|10;20;30|];<br \/>\n    [|100;200;300|];<br \/>\n  |]<br \/>\nlet v2 = Array2D.init 4 3 ( fun i j -&gt; vv.[i].[j])<\/p>\n<p>let mutable cnti = 3<br \/>\nlet mutable cntj = 4<br \/>\nlet ans3 = SUM2( v2, &amp;cnti, &amp;cntj )<\/p>\n<p>Console.WriteLine( &quot;ans3 {0}&quot;, ans3 )<br \/>\n[\/code]<\/p>\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_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[59,43],"tags":[],"class_list":["post-6759","post","type-post","status-publish","format-standard","hentry","category-f","category-fortran"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_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}]}}