2020-09-16 20:19:21 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-09-18 12:30:00 +02:00
|
|
|
mkdir -p hl_ops
|
2020-09-16 20:19:21 +02:00
|
|
|
for x in $(cat ../include/extensions/math.h) ; do
|
|
|
|
test "${x}" = "#ifdef" && continue
|
|
|
|
test "${x}" = "#endif" && continue
|
|
|
|
test "${x}" = "regFunc1" && continue
|
|
|
|
xx=${x#regFunc1\(}
|
|
|
|
fff=${xx%\)}
|
|
|
|
file=hl_ops/${fff}.cc
|
|
|
|
test -f ${file} && rm -f ${file}
|
2021-07-28 19:55:37 +02:00
|
|
|
echo "#include \"cnorxz.h\"" >> ${file}
|
|
|
|
echo "#include \"hl_cnorxz.h\"" >> ${file}
|
2020-09-16 20:19:21 +02:00
|
|
|
echo "" >> ${file}
|
2021-07-28 20:29:56 +02:00
|
|
|
echo "namespace CNORXZ" >> ${file}
|
2020-09-16 20:19:21 +02:00
|
|
|
echo "{" >> ${file}
|
|
|
|
echo " template class HighLevelOp<OpCD,x_${fff}<double>,1>;" >> ${file}
|
|
|
|
echo " template class HighLevelOp<OpD,x_${fff}<double>,1>;" >> ${file}
|
|
|
|
echo " template HighLevelOpHolder<OpCD> hl_${fff} (const HighLevelOpHolder<OpCD>& in);" >> ${file}
|
|
|
|
echo " template HighLevelOpHolder<OpD> hl_${fff} (const HighLevelOpHolder<OpD>& in);" >> ${file}
|
|
|
|
echo "}" >> ${file}
|
|
|
|
done
|
|
|
|
|
|
|
|
for fff in plus minus multiplies divides ; do
|
|
|
|
file=hl_ops/${fff}.cc
|
2020-09-18 12:37:14 +02:00
|
|
|
test -f ${file} && rm -f ${file}
|
2021-07-28 19:55:37 +02:00
|
|
|
echo "#include \"cnorxz.h\"" >> ${file}
|
|
|
|
echo "#include \"hl_cnorxz.h\"" >> ${file}
|
2020-09-16 20:19:21 +02:00
|
|
|
echo "" >> ${file}
|
2021-07-28 20:29:56 +02:00
|
|
|
echo "namespace CNORXZ" >> ${file}
|
2020-09-16 20:19:21 +02:00
|
|
|
echo "{" >> ${file}
|
|
|
|
echo " template class HighLevelOp<OpCD,${fff}x<double,double>,2>;" >> ${file}
|
|
|
|
echo " template class HighLevelOp<OpD,${fff}x<double,double>,2>;" >> ${file}
|
|
|
|
echo "}" >> ${file}
|
|
|
|
done
|
2020-12-07 13:46:01 +01:00
|
|
|
|
|
|
|
for fff in negate ; do
|
|
|
|
file=hl_ops/${fff}.cc
|
|
|
|
test -f ${file} && rm -f ${file}
|
2021-07-28 19:55:37 +02:00
|
|
|
echo "#include \"cnorxz.h\"" >> ${file}
|
|
|
|
echo "#include \"hl_cnorxz.h\"" >> ${file}
|
2020-12-07 13:46:01 +01:00
|
|
|
echo "" >> ${file}
|
2021-07-28 20:29:56 +02:00
|
|
|
echo "namespace CNORXZ" >> ${file}
|
2020-12-07 13:46:01 +01:00
|
|
|
echo "{" >> ${file}
|
|
|
|
echo " template class HighLevelOp<OpCD,${fff}<double>,1>;" >> ${file}
|
|
|
|
echo " template class HighLevelOp<OpD,${fff}<double>,1>;" >> ${file}
|
|
|
|
echo "}" >> ${file}
|
|
|
|
done
|