www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Article: Interfacing D with C and Fortran

reply data pulverizer <data.pulverizer gmail.com> writes:
FYI: My article with  9il "Interfacing D with C and Fortran" is 
now up 
http://www.active-analytics.com/blog/interface-d-with-c-fortran/

Thanks to those that made suggestions that informed the article.

You may also want to check out "A quick look at D" article 
http://www.active-analytics.com/blog/a-quick-look-at-d/ which is 
a "flyby" visitation of D from a numeric point of view.

Thanks

p.s. Sorry for originally positing this in the General Forum, it 
should be here instead

---
DP
Apr 13
next sibling parent reply jmh530 <john.michael.hall gmail.com> writes:
On Thursday, 13 April 2017 at 09:19:05 UTC, data pulverizer wrote:
 FYI: My article with  9il "Interfacing D with C and Fortran" is 
 now up 
 http://www.active-analytics.com/blog/interface-d-with-c-fortran/

 Thanks to those that made suggestions that informed the article.

 You may also want to check out "A quick look at D" article 
 http://www.active-analytics.com/blog/a-quick-look-at-d/ which 
 is a "flyby" visitation of D from a numeric point of view.

 Thanks

 p.s. Sorry for originally positing this in the General Forum, 
 it should be here instead

 ---
 DP
Looks good. Also, I tried to add the blog to feedly, but it wasn't having any of it. You might want to create an RSS feed for it.
Apr 13
parent reply jmh530 <john.michael.hall gmail.com> writes:
On Thursday, 13 April 2017 at 11:23:32 UTC, jmh530 wrote:
 Looks good.

 Also, I tried to add the blog to feedly, but it wasn't having 
 any of it. You might want to create an RSS feed for it.
Just an FYI, I was looking at another post http://www.active-analytics.com/blog/fitting-glm-with-large-datasets/ and the top part is a little confusing because the code below switches it up to do CC=BB*AA instead of CC=AA*BB. If I'm understanding it correctly, you originally have an mXn matrix times an nXp matrix, then you partition the left hand side to be mXk and the right hand to kXp and loop through and add them up. However, at the top you say that A (which at the top is the left hand variable) is split up by rows. However, the code clearly splits the left hand side (B here) by columns (BB is 5X100 and B is a 10-dimensional list of 5X10 matrices).
Apr 14
parent data pulverizer <data.pulverizer gmail.com> writes:
On Friday, 14 April 2017 at 17:55:54 UTC, jmh530 wrote:
 On Thursday, 13 April 2017 at 11:23:32 UTC, jmh530 wrote:

 Just an FYI, I was looking at another post

 http://www.active-analytics.com/blog/fitting-glm-with-large-datasets/

 and the top part is a little confusing because the code below 
 switches it up to do CC=BB*AA instead of CC=AA*BB.

 If I'm understanding it correctly, you originally have an mXn 
 matrix times an nXp matrix, then you partition the left hand 
 side to be mXk and the right hand to kXp and loop through and 
 add them up. However, at the top you say that A (which at the 
 top is the left hand variable) is split up by rows. However, 
 the code clearly splits the left hand side (B here) by columns 
 (BB is 5X100 and B is a 10-dimensional list of 5X10 matrices).
Sorry, I didn't see your question until now. That article was something I worked on years earlier. The main principle is that you split and aggregate over repeated indices. The code is intended to be illustrative of the principle. Don't get too hung up with equating the the code symbols with equation - the principle is the main thing. I wrote an R package where the important bits is written in C++: https://cran.r-project.org/web/packages/bigReg/index.html using the principle in GLM MORE IMPORTANTLY, however is that that algorithm is not efficient! At least not as efficient as gradient descent or even better stochastic gradient descent or their respective modifications.
Apr 17
prev sibling parent reply Mike Parker <aldacron gmail.com> writes:
On Thursday, 13 April 2017 at 09:19:05 UTC, data pulverizer wrote:
 FYI: My article with  9il "Interfacing D with C and Fortran" is 
 now up 
 http://www.active-analytics.com/blog/interface-d-with-c-fortran/

 Thanks to those that made suggestions that informed the article.

 You may also want to check out "A quick look at D" article 
 http://www.active-analytics.com/blog/a-quick-look-at-d/ which 
 is a "flyby" visitation of D from a numeric point of view.

 Thanks

 p.s. Sorry for originally positing this in the General Forum, 
 it should be here instead

 ---
 DP
https://www.reddit.com/r/programming/comments/655ilu/interfacing_d_with_c_and_fortran/
Apr 13
parent Pradeep Gowda <pradeep btbytes.com> writes:
On Thursday, 13 April 2017 at 13:40:48 UTC, Mike Parker wrote:

 https://www.reddit.com/r/programming/comments/655ilu/interfacing_d_with_c_and_fortran/
On lobste.rs: https://lobste.rs/s/pidpz1/interfacing_d_with_c_fortran_use_d_as
Apr 13