<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Vector to Multidimensional array in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945771#M18255</link>
    <description>Hi, &lt;BR /&gt;If Ive understood  Mike and Steve ideas, I may sum up three possibilities: &lt;BR /&gt;- common and/or equivalence &lt;BR /&gt;- reshape &lt;BR /&gt;- doc and pointer &lt;BR /&gt; &lt;BR /&gt;There is still another, following Steve, that is to re shape &lt;BR /&gt;the  rank of the vector intrinsically by defining the vector inside the called subroutine with a different rank from the one used in the calling subroutine. &lt;BR /&gt;But this alternative does not work if Ive to use an INTERFACE to pass &lt;BR /&gt;the parameters, and thats my actual problem. &lt;BR /&gt; &lt;BR /&gt;My conclusion is: or I use RESHAPE and, as Steve said,  Ill copy the original &lt;BR /&gt;array in a new one (and I wouldnt like to do that, otherwise Ill probably have memory problems) or I use a nonstandard &lt;BR /&gt;F9x feature LOC and POINTER with pointee. The COMOM alternative is not &lt;BR /&gt;possible in my case. &lt;BR /&gt; &lt;BR /&gt;Am I wrong? &lt;BR /&gt;Thank you in advance. &lt;BR /&gt;Luiz.</description>
    <pubDate>Tue, 10 Apr 2001 02:17:38 GMT</pubDate>
    <dc:creator>Intel_C_Intel</dc:creator>
    <dc:date>2001-04-10T02:17:38Z</dc:date>
    <item>
      <title>Vector to Multidimensional array</title>
      <link>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945763#M18247</link>
      <description>Hi all, &lt;BR /&gt;I've a work area in my program stored in a single one-dimensional array; I'd like  to redefine this area using multidimensional arrays(two, three or four). Is there any efficient way to do that? &lt;BR /&gt; &lt;BR /&gt;Thank you in advance, &lt;BR /&gt;Luiz.</description>
      <pubDate>Wed, 04 Apr 2001 08:29:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945763#M18247</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-04-04T08:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Vector to Multidimensional array</title>
      <link>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945764#M18248</link>
      <description>If the array is a local variable (not an argument), or is in COMMON, use EQUIVALENCE.&lt;BR /&gt;&lt;BR /&gt;Another method is to pass the array as an argument to a subroutine that declares the argument wth the shape you want.  Depending on what you want to do with it, the RESHAPE intrinsic may be of help - it will return a copy of the array with a different shape - you could store this in another array, but this means making a copy.&lt;BR /&gt;&lt;BR /&gt;Another option is to use the "Compaq Fortran POINTER extension" as it is termed, for example:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="+1"&gt;&lt;PRE&gt;
real array1d(10000)
real array2d(100,100)
pointer (p,array2d)
...
p = loc(array1d)
! Now use array2d
&lt;/PRE&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Wed, 04 Apr 2001 09:04:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945764#M18248</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2001-04-04T09:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Vector to Multidimensional array</title>
      <link>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945765#M18249</link>
      <description>Thank you Steve for your answer, &lt;BR /&gt;but my point is the following: &lt;BR /&gt;in your example, using array1d and array2d, one needs to use &lt;BR /&gt;twenty thousand real positions, ten thousand for the first and ten &lt;BR /&gt;thousand for the second. Is there any way to spend only ten thousand &lt;BR /&gt;positions as in I? &lt;BR /&gt;Thank you again, &lt;BR /&gt;quiz</description>
      <pubDate>Thu, 05 Apr 2001 06:23:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945765#M18249</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-04-05T06:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Vector to Multidimensional array</title>
      <link>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945766#M18250</link>
      <description>Luiz,&lt;BR /&gt;&lt;BR /&gt;In my example using POINTER, there are only 10,000 "real positions".  array2d is not allocated any memory at all - it is considered to "live" at whatever address is stored in the pointer variable p, which is assigned the address of array1d.  So in essence, the two arrays share the same space.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Thu, 05 Apr 2001 06:39:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945766#M18250</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2001-04-05T06:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Vector to Multidimensional array</title>
      <link>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945767#M18251</link>
      <description>Steve,  &lt;BR /&gt;The alternative that mixes POINTER and LAC is fine, thank you. The  &lt;BR /&gt;only problem is that, as the compilers points out, this is not a F95   &lt;BR /&gt;standard. Do you know any F95 standard that does the same  &lt;BR /&gt;construction (an allocated work one dimensional array that changes shape)  &lt;BR /&gt;Thanks,  &lt;BR /&gt;quiz</description>
      <pubDate>Fri, 06 Apr 2001 20:02:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945767#M18251</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-04-06T20:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Vector to Multidimensional array</title>
      <link>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945768#M18252</link>
      <description>Passing arrays as arguments to subprograms passes the address of the first array element. Can't you redeclare the array to be any shape you want inside the subprogram? &lt;BR /&gt; &lt;BR /&gt;For example, if you pass a 1000-element array A to a subprogram, then isn't the subprogram free to redeclare the array as B(10,10,10)? I think that's standard Fortran, but it requires you to do all the processing on the reshaped array within the subprogram. To prevent the subprogram from accessing the wrong parts of memory, the total number of array elements in the subprogram should be &amp;lt;= that of the array in the calling routine. &lt;BR /&gt; &lt;BR /&gt;Mike Durisin</description>
      <pubDate>Fri, 06 Apr 2001 21:01:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945768#M18252</guid>
      <dc:creator>durisinm</dc:creator>
      <dc:date>2001-04-06T21:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Vector to Multidimensional array</title>
      <link>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945769#M18253</link>
      <description>Mike,&lt;BR /&gt;&lt;BR /&gt;That works - and was one of the first things I suggested.  Yes, it is standard-conforming.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Sat, 07 Apr 2001 00:06:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945769#M18253</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2001-04-07T00:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Vector to Multidimensional array</title>
      <link>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945770#M18254</link>
      <description>Sorry to repeat that information. I should have paid closer attention to what you wrote. &lt;BR /&gt; &lt;BR /&gt;Mike</description>
      <pubDate>Sat, 07 Apr 2001 00:17:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945770#M18254</guid>
      <dc:creator>durisinm</dc:creator>
      <dc:date>2001-04-07T00:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Vector to Multidimensional array</title>
      <link>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945771#M18255</link>
      <description>Hi, &lt;BR /&gt;If Ive understood  Mike and Steve ideas, I may sum up three possibilities: &lt;BR /&gt;- common and/or equivalence &lt;BR /&gt;- reshape &lt;BR /&gt;- doc and pointer &lt;BR /&gt; &lt;BR /&gt;There is still another, following Steve, that is to re shape &lt;BR /&gt;the  rank of the vector intrinsically by defining the vector inside the called subroutine with a different rank from the one used in the calling subroutine. &lt;BR /&gt;But this alternative does not work if Ive to use an INTERFACE to pass &lt;BR /&gt;the parameters, and thats my actual problem. &lt;BR /&gt; &lt;BR /&gt;My conclusion is: or I use RESHAPE and, as Steve said,  Ill copy the original &lt;BR /&gt;array in a new one (and I wouldnt like to do that, otherwise Ill probably have memory problems) or I use a nonstandard &lt;BR /&gt;F9x feature LOC and POINTER with pointee. The COMOM alternative is not &lt;BR /&gt;possible in my case. &lt;BR /&gt; &lt;BR /&gt;Am I wrong? &lt;BR /&gt;Thank you in advance. &lt;BR /&gt;Luiz.</description>
      <pubDate>Tue, 10 Apr 2001 02:17:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945771#M18255</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-04-10T02:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Vector to Multidimensional array</title>
      <link>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945772#M18256</link>
      <description>Well, you could add:&lt;BR /&gt;&lt;BR /&gt;!DEC$ ATTRIBUTES NO_ARG_CHECK :: argname&lt;BR /&gt;&lt;BR /&gt;in the INTERFACE - this will suppress shape-matching warnings for this argument.  That is non-standard, of course.&lt;BR /&gt;&lt;BR /&gt;Another idea is to pass just the first element of the array - Fortran language rules for sequence association should do the rest.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Tue, 10 Apr 2001 02:51:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Vector-to-Multidimensional-array/m-p/945772#M18256</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2001-04-10T02:51:30Z</dc:date>
    </item>
  </channel>
</rss>

