- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe the IMSL has a module USE LINEAR_OPERATORS which, among other things, enables matrix multiplication with syntax such as C = A .x. B. Are there any open source versions of this?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you have a library that does the operation, it's straightforward to define your own operators for it. Do note that Fortran has a MATMUL intrinsic if that specific operation is what you want - you can define an operator for it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've cobbled something together that seems to work. I wanted to compare what I did to how a more knowledgeable person would do it. I'm sure plenty of skilled fortran programmers have done it, but using Google I was unable to find any.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following link may be worth a read: http://www.mathcs.emory.edu/~cheung/Courses/561/Syllabus/6-Fortran/operators.html .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
https://books.google.com/books/about/Numerical_Computing_with_Modern_Fortran.html?id=Oe4mAgAAQBAJ
Going through a book like this whose lead author had worked extensively on IMSL code might provide a more comprehensive and structured information to OP on modern Fortran including defined operations. There are lots of code examples in the book with source code available to purchasers that illustrate what OP asks i.e., "how a more knowledgeable person would" approach numerical computing with features in Fortran:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the links. The emory web site is very good. I just bought the Hanson book at Amazon, and pdf version of the same at https://littlethingsbook.store/
In my own creation, I have gone the route of creating custom operators like .x. and .t. and .tx. rather than overloading the language's existing operators. The ability to do this is a great addition to the Fortran standard.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
write(*,101) 101 Format()
I never knew this was valid code that prints a new line.
![](/skins/images/D2683F18326913BBA0436CB7114DD569/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page