IBM

Array Package and BLAS for Java - FAQ


  1. What is the Array Package and BLAS for Java?
  2. What are the advantages of the Array Package and BLAS for Java?
  3. What disadvantages are there to using this package?
  4. What are the system requirements for the Array Package and BLAS for Java?
  5. How do I install the Array Package and BLAS for Java?
  6. How do I report bugs?
  7. Where do I find out more?
What is the Array Package and BLAS for Java?

The Array Package for Java is a collection of class files that provides to the Java programmer a true multidimensional Array data type. The element types supported are all the Java primitive types, Object and Complex. The Array package supports Arrays of up to rank 3, and provides a variety of operations on those Arrays. Methods and constructors are provided to support:

  1. Array creation operations allow new Arrays to be defined by providing either extents along an axis, an existing Array, or a Java array.
  2. Accessor operations, which allow the values of elements, and groups of elements, to be read and written from the Array. Index and Range objects are used by accessors to specify the element values to be read and written. The choice of Index allows Fortran 90-style sections, gather/scatter and single element access to be performed on a axis-by-axis basis.
  3. Inquiry operations allow properties of the Array to be queried, e.g. the extent, last valid element, and rank, among others.
  4. Manipulation operations allow sections of the Array to be selected, axes to be permuted, and for a new Array to be created via a reshape operation.
  5. Numeric/logical operations performed element-wise. These include the basic numerical operations and logical operations, as appropriate to the elemental type.
  6. BLAS operations are provided to support basic linear algebra operations. Currently, only the following operations are supported:
    1. BLAS Level 1: Vector-Vector operations
      • ddot : dot product of two vectors
      • daxpy : scalar times a vector plus a vector
      • drotg : construct a Givens plane rotation
      • drot : apply a plane rotation
      • dcopy : copy vector X to vector Y
      • dswap : interchange vectors X and Y
      • dnrm2 : Euclidean norm of a vector
      • dasum : sum of absolute values of vector components
      • dscal : scale a vector by a scalar
      • idamax : index of element with maximum absolute value
    2. BLAS Level 2: Matrix-Vector operations
      • dgemv : matrix-vector multiply with general matrix
      • dger : rank-1 update on general matrix
      • dsymv : matrix-vector multiply with symmetric matrix
      • dtrmv : matrix-vector multiply with triangular matrix
    3. BLAS Level 3: Matrix-Matrix operations
      • dgemm : matrix-matrix multiply with general matrices
    A future version of the Array Package will support the full BLAS.

[Top]

What are the advantages of using Arrays relative to Java arrays?

The most immediate advantages flow from the supported operations. As discussed in the previous question, a variety of operations taken for granted by Fortran programmers, including a BLAS implementation and efficient sectioning operations, are provided. Because the Array package has been designed both for ease of use, and for easy optimization by Java compilers, it is our expectation that optimizing Java compilers will be able generate code with significantly higher performance than the equivalent programs written using Java arrays. A fuller discussion of the philosophy behind the Array package, and its advantages, can be found in our technical report, A Standard Java Array Package for Technical Computing, available in postscript (132KB) or PDF (146KB).

[Top]

What disadvantages are there in using the Array Package for Java?

Programs that use elemental Array Package operations (e.g. element get or set) and no aggregate operations (e.g. BLAS or numerical or logical Array operations) may perform worse than an equivalent program using Java arrays, with some compilers/JVMs. We will appreciate your feedback should you discover other disadvantages.

[Top]

What are the system requirements for the Array Package for Java?

The Array package was developed and extensively tested under JDK 1.1.6. and so we recommend using this, or a newer version of the JDK. At least 10MB of disk space is required to store the Array Package files (without the documentation the disk space requirement is just 240KB). The required amount of memory to run the Array Package is 32MB, with 64MB of memory recommended. 64MB is required if you use an IDE.

[Top]

How do I install the Array Package and BLAS for Java?

In brief:

  1. Download the Array Package and BLAS for Java.
  2. Unzip the arraypak.zip file just downloaded.
  3. Move the array.zip class file to a convenient directory.
  4. Add the file array.zip to your CLASSPATH setting, or import it into your development environment.

Please see your Java installation instructions for details on how to change your CLASSPATH.

You should now be able to compile and run the demonstration application.

[Top]

How do I report bugs?

Please send mail describing the problem to smidkiff@us.ibm.com.

Please include compilable source code for a sample class (as small as possible) that demonstrates the problem. A short explanation of the problem and the software and hardware platforms you have encountered it on will also be helpful.

[Top]

Where do I find out more?

Our technical report, A Standard Java Array Package for Technical Computing available in either postscript (132KB) or PDF(146K) discusses the guiding principles, rationale, and design of the Array Package for Java and BLAS. The Documentation, included in arraydoc.zip, gives complete details about the methods available. Additional details about this, and other work by our group with Java and numerically intensive computing can be found in our papers and presentations

There is also a collection of small demonstration applications which demonstrate how to use the Array Package for Java and BLAS routines.

[Top]


Copyright © IBM Corporation, 1999. All rights reserved.

[ IBM home page | Search | Contact IBM | Help | Legal | Privacy ]