mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-04-19 07:00:10 +02:00
Cleaned AO file
This commit is contained in:
parent
1be1a99529
commit
5b6404db92
1443
org/qmckl_ao.org
1443
org/qmckl_ao.org
File diff suppressed because it is too large
Load Diff
@ -76,9 +76,9 @@ def parse_table(table):
|
|||||||
result = []
|
result = []
|
||||||
|
|
||||||
for line in [ [x.replace('~','') for x in y] for y in table]:
|
for line in [ [x.replace('~','') for x in y] for y in table]:
|
||||||
d = { "c_type" : line[1].split('[')[0],
|
d = { "name" : line[0],
|
||||||
|
"c_type" : line[1],
|
||||||
"inout" : line[2].lower(),
|
"inout" : line[2].lower(),
|
||||||
"name" : line[0],
|
|
||||||
"comment" : line[3] }
|
"comment" : line[3] }
|
||||||
|
|
||||||
# Handle inout
|
# Handle inout
|
||||||
@ -95,7 +95,7 @@ def parse_table(table):
|
|||||||
if d["rank"] == 0:
|
if d["rank"] == 0:
|
||||||
d["dims"] = []
|
d["dims"] = []
|
||||||
else:
|
else:
|
||||||
d["name"] = d["name"].split('[')[0].strip()
|
d["c_type"] = d["c_type"].split('[')[0].strip()
|
||||||
d["dims"] = [ x.replace(']','').strip() for x in dims[1:] ]
|
d["dims"] = [ x.replace(']','').strip() for x in dims[1:] ]
|
||||||
|
|
||||||
result.append(d)
|
result.append(d)
|
||||||
@ -106,7 +106,7 @@ def parse_table(table):
|
|||||||
*** Generates a C header
|
*** Generates a C header
|
||||||
|
|
||||||
#+NAME: generate_c_header
|
#+NAME: generate_c_header
|
||||||
#+BEGIN_SRC python :var table=test :var rettyp=[] :var fname=[] :results drawer :noweb yes :wrap "src c :tangle (eval h_func) :comments org"
|
#+BEGIN_SRC python :var table=test :var rettyp="qmckl_exit_code" :var fname=[] :results drawer :noweb yes :wrap "src c :tangle (eval h_func) :comments org"
|
||||||
<<parse_table>>
|
<<parse_table>>
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
@ -137,20 +137,21 @@ return template
|
|||||||
|
|
||||||
#+RESULTS: generate_c_header
|
#+RESULTS: generate_c_header
|
||||||
#+begin_src c :tangle (eval h_func) :comments org
|
#+begin_src c :tangle (eval h_func) :comments org
|
||||||
[] [] (
|
qmckl_exit_code [] (
|
||||||
const context qmckl_context,
|
const qmckl_context context,
|
||||||
const transa char,
|
const char transa,
|
||||||
const transb char,
|
const char transb,
|
||||||
const m int64_t,
|
const int64_t m,
|
||||||
const n int64_t,
|
const int64_t n,
|
||||||
const A* double,
|
const double* A,
|
||||||
const lda int64_t,
|
const int64_t lda,
|
||||||
const B* double,
|
const double* B,
|
||||||
const ldb int64_t,
|
const int64_t ldb,
|
||||||
C* const double,
|
double* const C,
|
||||||
const ldc int64_t );
|
const int64_t ldc );
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
*** Generates a C interface to the Fortran function
|
*** Generates a C interface to the Fortran function
|
||||||
|
|
||||||
#+NAME: generate_c_interface
|
#+NAME: generate_c_interface
|
||||||
|
Loading…
x
Reference in New Issue
Block a user