Skip to content

Commit

Permalink
openblass_full inherits openblas
Browse files Browse the repository at this point in the history
... and just redefines map().
  • Loading branch information
blueberry authored Jan 21, 2025
1 parent 3e2c13b commit 2bc0cde
Showing 1 changed file with 1 addition and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,7 @@
@Platform(
include = {"openblas_config.h", "cblas.h", "lapacke_config.h", "lapacke_mangling.h", "lapack.h", "lapacke.h", "lapacke_utils.h"})})
@NoException
public class openblas_full extends openblas_nolapack {

@Override public void init(ClassProperties properties) {
super.init(properties);

List<String> links = properties.get("platform.link");
List<String> preloads = properties.get("platform.preload");

// Replace all occurences of "openblas_nolapack" with "openblas_full" (with LAPACK)
for (List<String> l : new List[] {links, preloads}) {
ListIterator<String> it = l.listIterator();
while (it.hasNext()) {
String s = it.next();
if (s.contains("openblas_nolapack")) {
it.remove();
s = s.replace("openblas_nolapack", "openblas_full");
if (!l.contains(s)) {
it.add(s);
}
}
}
}
}
public class openblas_full extends openblas {

@Override public void map(InfoMap infoMap) {
infoMap.put(new Info("lapack.h", "lapacke.h").linePatterns(".*LAPACK_GLOBAL.*").skip())
Expand Down

0 comments on commit 2bc0cde

Please sign in to comment.