<?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: C based SAS routine in IML in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/C-based-SAS-routine-in-IML/m-p/230729#M2409</link>
    <description>&lt;P&gt;I've never done this in PROC IML, but I have three comments:&lt;/P&gt;
&lt;P&gt;1) SAS/IML uses the MODULEI (return void), MODULEIN (return number), and MODULEIC (return char) subroutines to call DLLs that contain C functions.&amp;nbsp; You can pass in vector&amp;nbsp;and matrices for&amp;nbsp;arguments.If you mark an argument as 'update', then the C routine can change the values of the argument (like passing a pointer).&amp;nbsp;&amp;nbsp; I think this is what you want to do.&lt;/P&gt;
&lt;P&gt;2) Although I have never done (1),&amp;nbsp; I have called C DLLs from the SAS/IML Studio application, which has a much simpler system for calling DLLs. See the documentation for "Extending IML"--&amp;gt;"UIsing C" at &lt;A href="http://support.sas.com/documentation/onlinedoc/imlstudio/WebHelp132/root.htm" target="_blank"&gt;http://support.sas.com/documentation/onlinedoc/imlstudio/WebHelp132/root.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;3) I have found that well-written vectorized IML code is almost as fast as C code for many applications. You might want to post what you are trying to accomplish. Someone might have IML code that does it already.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Oct 2015 13:31:00 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2015-10-20T13:31:00Z</dc:date>
    <item>
      <title>C based SAS routine in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/C-based-SAS-routine-in-IML/m-p/230705#M2408</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;I use a C code to create a subroutine (using proc proto and proc fcmp). The problem is that it uses a vector as a parameter and creates a vector as a result. This looks problematic in data step of BASE SAS, but I thought SAS IML might work out way better. Does anyone have&amp;nbsp;a clue how to use a SAS routine in SAS IML? Or anyone knows a way how to make this work in a data step?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 11:43:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/C-based-SAS-routine-in-IML/m-p/230705#M2408</guid>
      <dc:creator>Ivan_Vovkanych</dc:creator>
      <dc:date>2015-10-20T11:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: C based SAS routine in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/C-based-SAS-routine-in-IML/m-p/230729#M2409</link>
      <description>&lt;P&gt;I've never done this in PROC IML, but I have three comments:&lt;/P&gt;
&lt;P&gt;1) SAS/IML uses the MODULEI (return void), MODULEIN (return number), and MODULEIC (return char) subroutines to call DLLs that contain C functions.&amp;nbsp; You can pass in vector&amp;nbsp;and matrices for&amp;nbsp;arguments.If you mark an argument as 'update', then the C routine can change the values of the argument (like passing a pointer).&amp;nbsp;&amp;nbsp; I think this is what you want to do.&lt;/P&gt;
&lt;P&gt;2) Although I have never done (1),&amp;nbsp; I have called C DLLs from the SAS/IML Studio application, which has a much simpler system for calling DLLs. See the documentation for "Extending IML"--&amp;gt;"UIsing C" at &lt;A href="http://support.sas.com/documentation/onlinedoc/imlstudio/WebHelp132/root.htm" target="_blank"&gt;http://support.sas.com/documentation/onlinedoc/imlstudio/WebHelp132/root.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;3) I have found that well-written vectorized IML code is almost as fast as C code for many applications. You might want to post what you are trying to accomplish. Someone might have IML code that does it already.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 13:31:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/C-based-SAS-routine-in-IML/m-p/230729#M2409</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-10-20T13:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: C based SAS routine in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/C-based-SAS-routine-in-IML/m-p/230735#M2410</link>
      <description>&lt;P&gt;Thank you Rick,&lt;/P&gt;
&lt;P&gt;I would like to calculate&amp;nbsp;poisson binomial distribution cdf.&lt;BR /&gt;Actualy this is one topic :&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Statistical-Procedures/Poisson-binomial-distribution-in-SAS/m-p/229875#M12115" target="_blank"&gt;https://communities.sas.com/t5/SAS-Statistical-Procedures/Poisson-binomial-distribution-in-SAS/m-p/229875#M12115&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ps. Unfortunately step 2 will not work for us because&amp;nbsp;not always might use&amp;nbsp;client Windows PC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 13:56:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/C-based-SAS-routine-in-IML/m-p/230735#M2410</guid>
      <dc:creator>Ivan_Vovkanych</dc:creator>
      <dc:date>2015-10-20T13:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: C based SAS routine in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/C-based-SAS-routine-in-IML/m-p/230743#M2411</link>
      <description>&lt;P&gt;Hmm, not for the faint of heart!&amp;nbsp; Have you looked at the FFT function in SAS/IML?&amp;nbsp; I think IML has the building blocks that you need, but that's not a trivial computation.&amp;nbsp;&amp;nbsp; I do not know which method would be easier: calling a C routine or rewriting in IML.&amp;nbsp; I guess if you have a working and debugged C routine, that is the method you should try first, but I am not finding any good examples that lay out all the steps for calling C functions from PROC IML.&amp;nbsp; I guess you'll have to use the examples for the DATA step versions such as&amp;nbsp;CALL MODULE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 14:06:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/C-based-SAS-routine-in-IML/m-p/230743#M2411</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-10-20T14:06:27Z</dc:date>
    </item>
  </channel>
</rss>

