Skip to content

Commit 76acde4

Browse files
author
Foadsf
committed
Merge branch 'master' of https://github.com/Foadsf/Cmathtus
2 parents 12c5ce4 + b91ea59 commit 76acde4

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

A_fortran/readme.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
fortran is actually a complete programing language separate from C, however considering it is the de facto programing language for mathematical and algebraic calculations, many legacy libraries, including BLAS and LAPACK are written in fortran. Of course you can use the libraries mentioned in this tutorial without knowing how to mix fortran and C, but knowing that not only will help you a lot to understand what happening under the hood but also gives you the ability to modify or even write your own fortran subroutines if required. not to mention it opens the door to tens of other libraries out there written in fortran. fortran is historically de facto programing language for mathematical operations and learning fortran for you as a C programer will be life changing.
1+
FORTRAN or Fortran is actually a different programing language separated from C, however considering it has been the de facto programing language for mathematical and algebraic calculations, many legacy libraries, including original implementations BLAS and LAPACK APIs are written in Fortran. Of course you can use the libraries mentioned in this tutorial without knowing how to do mixed Fortran and C programing, but knowing that not only will help you a lot understanding what happening under the hood, but also gives you the ability to modify or even write your own fortran subroutines if required. not to mention it opens the door to tens of other libraries out there written in fortran. fortran is historically the gold standard programing language for mathematical operations and learning fortran for you as a C programer will be life changing.
22

33
keywords:
44
mixed language programing

README.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
# Cmathtuts
2-
trying to collect all useful tutorials/examples for famous C math and algebra libraries such as BLAS, CBLAS, LAPACK, LAPACKE, CLAPACK, ATLAS, GSL...
3-
I want to make sure if you are a C developer you can use any of these libraries without any problems regardless of your platform or hardware
1+
# A collection of math tutorials in C
2+
While ago, when I started doing some linear algebra in C, it came to me as a surprise to see there are so few tutorials for BLAS, LAPACK and other fundamental APIs. Despite the fact that they are somehow the building blocks of many other libraries. For that reason I started collecting all the examples I could find all over the net for BLAS, LAPACK, CLAPACK, LAPACKE, ATLAS, OpenBLAS ... in this Github repo. Well, I should warn you that as a mechanical engineer I have little experience in managing such a repo and it might firstly seems as a complete mess to you guys. However if you manage to get over the mess you will find all kind of examples and instructions which might be help. I have tried the most and the ones does not compile I have mentioned. I have modified many of them to be compilable with GNU compilers (gcc, g++ and gfortran). I have made make files which you can read to learn how you can call individual fortran routines in a C or C++ program. I have also put some installations instructions for mac and linux (sorry windows guys!). I want to make sure if you are a C developer you can use any of these libraries without any problems regardless of your platform or hardware
43

54

65

76
issues:
87

9-
1. I really do not understand the difference between LAPACK, LAPACKE and CLAPACK there might be some confusion in the tutorials
10-
2. not able to compile ATLAS on mac OS X. a bug report was made on sourceforce: https://sourceforge.net/p/math-atlas/bugs/261/
11-
3. for some of the BLAS and CBLAS examples the -lgfortran is requred to compile. I don't know why! (on mac OS X you need to install gfortran and then look for libgfortran.dylib and link against it while compiling)
8+
9+
1. not able to compile ATLAS on mac OS X. a bug report was made on sourceforce: https://sourceforge.net/p/math-atlas/bugs/261/
10+
2. for some of the BLAS and CBLAS examples the -lgfortran is requred to compile. I don't know why! (on mac OS X you need to install gfortran and then look for libgfortran.dylib and link against it while compiling)
1211

1312

1413
to do:

0 commit comments

Comments
 (0)