Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arpack/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ information or have any questions.
<packaging>jar</packaging>

<properties>
<junit.version>5.8.2</junit.version>
<junit.version>5.13.4</junit.version>
<automatic.module.name>dev.ludovic.netlib.arpack</automatic.module.name>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

package dev.ludovic.netlib.arpack;

import java.util.logging.Level;
import java.util.logging.Logger;

final class InstanceBuilder {
Expand All @@ -39,6 +40,8 @@ final class InstanceBuilder {
nativeArpack = initializeNative();
javaArpack = initializeJava();
arpack = nativeArpack != null ? nativeArpack : javaArpack;

log.info("Using " + arpack.getClass().getName());
}

public static ARPACK arpack() {
Expand All @@ -49,7 +52,7 @@ private static NativeARPACK initializeNative() {
try {
return JNIARPACK.getInstance();
} catch (Throwable t) {
log.warning("Failed to load implementation from:" + JNIARPACK.class.getName());
log.log(Level.FINE, "Failed to load implementation from:" + JNIARPACK.class.getName(), t);
return null;
}
}
Expand Down
5 changes: 3 additions & 2 deletions arpack/src/main/java/dev/ludovic/netlib/arpack/JNIARPACK.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@

package dev.ludovic.netlib.arpack;

import java.io.InputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UncheckedIOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
Expand Down Expand Up @@ -55,7 +56,7 @@ protected JNIARPACK() {
StandardCopyOption.REPLACE_EXISTING);
temp.toFile().deleteOnExit();
} catch (IOException e) {
throw new RuntimeException("Unable to load native implementation", e);
throw new UncheckedIOException("Unable to load native implementation", e);
}

System.load(temp.toString());
Expand Down
2 changes: 1 addition & 1 deletion blas/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ information or have any questions.
<packaging>jar</packaging>

<properties>
<junit.version>5.8.2</junit.version>
<junit.version>5.13.4</junit.version>
<automatic.module.name>dev.ludovic.netlib.blas</automatic.module.name>
</properties>

Expand Down
12 changes: 7 additions & 5 deletions blas/src/main/java/dev/ludovic/netlib/blas/InstanceBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

package dev.ludovic.netlib.blas;

import java.util.logging.Level;
import java.util.logging.Logger;

final class InstanceBuilder {
Expand All @@ -39,6 +40,8 @@ final class InstanceBuilder {
nativeBlas = initializeNative();
javaBlas = initializeJava();
blas = nativeBlas != null ? nativeBlas : javaBlas;

log.info("Using " + blas.getClass().getName());
}

public static BLAS blas() {
Expand All @@ -49,7 +52,7 @@ private static NativeBLAS initializeNative() {
try {
return JNIBLAS.getInstance();
} catch (Throwable t) {
log.warning("Failed to load implementation from:" + JNIBLAS.class.getName());
log.log(Level.FINE, "Failed to load implementation from:" + JNIBLAS.class.getName(), t);
return null;
}
}
Expand All @@ -69,16 +72,15 @@ private static JavaBLAS initializeJava() {
log.finest("trying to return java 16 instance");
return VectorBLAS.getInstance();
} catch (Throwable t) {
log.warning("Failed to load implementation from:" + VectorBLAS.class.getName());
log.log(Level.FINE, "Failed to load implementation from:" + VectorBLAS.class.getName(), t);
}
}
if (major >= 11) {
log.finest("return java 11 instance");
return Java11BLAS.getInstance();
} else {
log.finest("return java 8 instance");
return Java8BLAS.getInstance();
}
log.finest("return java 8 instance");
return Java8BLAS.getInstance();
}

public static JavaBLAS javaBlas() {
Expand Down
5 changes: 3 additions & 2 deletions blas/src/main/java/dev/ludovic/netlib/blas/JNIBLAS.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@

package dev.ludovic.netlib.blas;

import java.io.InputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UncheckedIOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
Expand Down Expand Up @@ -55,7 +56,7 @@ protected JNIBLAS() {
StandardCopyOption.REPLACE_EXISTING);
temp.toFile().deleteOnExit();
} catch (IOException e) {
throw new RuntimeException("Unable to load native implementation", e);
throw new UncheckedIOException("Unable to load native implementation", e);
}

System.load(temp.toString());
Expand Down
2 changes: 1 addition & 1 deletion lapack/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ information or have any questions.
<packaging>jar</packaging>

<properties>
<junit.version>5.8.2</junit.version>
<junit.version>5.13.4</junit.version>
<automatic.module.name>dev.ludovic.netlib.lapack</automatic.module.name>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

package dev.ludovic.netlib.lapack;

import java.util.logging.Level;
import java.util.logging.Logger;

final class InstanceBuilder {
Expand All @@ -39,6 +40,8 @@ final class InstanceBuilder {
nativeLapack = initializeNative();
javaLapack = initializeJava();
lapack = nativeLapack != null ? nativeLapack : javaLapack;

log.info("Using " + lapack.getClass().getName());
}

public static LAPACK lapack() {
Expand All @@ -49,14 +52,14 @@ private static NativeLAPACK initializeNative() {
try {
return JNILAPACK.getInstance();
} catch (Throwable t) {
log.warning("Failed to load implementation from:" + JNILAPACK.class.getName());
log.log(Level.FINE, "Failed to load implementation from:" + JNILAPACK.class.getName(), t);
return null;
}
}

public static NativeLAPACK nativeLapack() {
if (nativeLapack == null) {
throw new RuntimeException("Unable to load native implementation");
throw new RuntimeException("Unable to load native LAPACK implementation");
}
return nativeLapack;
}
Expand Down
6 changes: 4 additions & 2 deletions lapack/src/main/java/dev/ludovic/netlib/lapack/JNILAPACK.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
package dev.ludovic.netlib.lapack;

import java.io.InputStream;
import java.io.UncheckedIOException;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
Expand Down Expand Up @@ -55,10 +56,11 @@ protected JNILAPACK() {
StandardCopyOption.REPLACE_EXISTING);
temp.toFile().deleteOnExit();
} catch (IOException e) {
throw new RuntimeException("Unable to load native implementation", e);
throw new UncheckedIOException("Unable to load native implementation", e);
}

System.load(temp.toString());}
System.load(temp.toString());
}

public static NativeLAPACK getInstance() {
return instance;
Expand Down