
gov.sandia.cognition.math.matrix.mtj.NativeMatrixTests Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cognitive-foundry Show documentation
Show all versions of cognitive-foundry Show documentation
A single jar with all the Cognitive Foundry components.
/*
* File: NativeLibraryTests.java
* Authors: Kevin R. Dixon
* Company: Sandia National Laboratories
* Project: Cognitive Framework Lite
*
* Copyright December 1, 2006, Sandia Corporation. Under the terms of Contract
* DE-AC04-94AL85000, there is a non-exclusive license for use of this work by
* or on behalf of the U.S. Government. Export of this program may require a
* license from the United States Government. See CopyrightHistory.txt for
* complete details.
*
*
*/
package gov.sandia.cognition.math.matrix.mtj;
import org.netlib.blas.BLAS;
import org.netlib.lapack.LAPACK;
/**
* Tests to see if native versions of LAPACK and BLAS are loaded
*
* @author Kevin R. Dixon
* @since 1.0
*
*/
public class NativeMatrixTests
{
/**
* Tests if Native LAPACK is loaded
* @return
* true if native LAPACK loaded, false if Java LAPACK is loaded
*/
public static boolean isNativeLAPACK()
{
return LAPACK.getInstance().getClass().getName().contains("Native");
}
/**
* Tests if Native BLAS is loaded
* @return
* true if native BLAS loaded, false if Java BLAS is loaded
*/
public static boolean isNativeBLAS()
{
return BLAS.getInstance().getClass().getName().contains("Native");
}
public static void main(String... a)
{
System.out.println(BLAS.getInstance().getClass().getName());
System.out.println(LAPACK.getInstance().getClass().getName());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy