### Contents of the Distribution

The archive contains all
the libraries and include files needed
to build applications using LUGPU. The only assumption made about the
target system is the presence of a
working OpenGL runtime with the correct drivers for the video card and
the presence of GLUT.
In
case you are not sure about the video drivers on your system and own an
NVIDIA
card, go here
to install the latest drivers for your system. The following
is
a description of what each folder contains:

- src: Source
code for the LUGPU library
- include:
Include files
for applications using LUGPU
- Samples:
Three examples
demonstrating usage of the LUGPU library
**Project
files: **Project files for
Microsoft
Visual Studio 6.0
- lib: Contains
the
LUGPU library for Win32

### Building an application

Setting up the library for use
in your application is simple.

- Build the lugpu library
- Make sure you link to
glut32.lib and lugpu.lib
- The
**include**
folder included with the distribution should be in your include path
- Once the above two things
have been done, all you need to do is #include
<ludecom.h>
in your application

### LUGPU API

## lugpu_initilize(int argc, char ** argv)

This method must be called before any other calls to the API can be made. This should only be called once.

**argc**The number of arguments to the program.

**argv**The list of arguments to the program.

## void lugpu_sgetrf(const int *m,const int *n,float *matrix,const int *lda,int *pivot,int *info)

**m** (input) The number of rows of the matrix A. M >= 0.

**n** (input) The number of columns of the matrix A. N >= 0.

**A** (input/output)
On entry, the M-by-N matrix to be factored. On
exit, the factors L and U from the factorization A
= P*L*U; the unit diagonal elements of L are not
stored.

**A** (input) Current ignored.

**IPIVOT** (output)
The pivot indices; for 1 <= i <= min(M,N), row i
of the matrix was interchanged with row IPIVOT(i).

** INFO **(output)
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an ille-
gal value

## lugpu_sgetc2(const int *m,float *matrix,const int *lda,int *cpivot,int*rpivot,int *info)

**N** (input) INTEGER
The order of the matrix A. N >= 0.

**A** (input/output) REAL array, dimension (LDA, N)
On entry, the n-by-n matrix A to be factored.
On exit, the factors L and U from the factorization
A = P*L*U*Q; the unit diagonal elements of L are not stored.
If U(k, k) appears to be less than SMIN, U(k, k) is given the
value of SMIN, i.e., giving a nonsingular perturbed system.

**LDA** (input) currently ignroed and assumed to be N.

**IPIV** (output) INTEGER array, dimension(N).
The pivot indices; for 1 <= i <= N, row i of the
matrix has been interchanged with row IPIV(i).

**JPIV** (output) INTEGER array, dimension(N).
The pivot indices; for 1 <= j <= N, column j of the
matrix has been interchanged with column JPIV(j).

**INFO** (output) INTEGER
= 0: successful exit