About Matrix Inversion

I want GPU program for matrix inversion …

I suppose you don’t need the matrix inverse explicitly. The CUBLAS library provides routines for matrix factorization (LU, …).

sorry but dont understand your post…

i want to say something…
I have a this function for inverse of matix in main.cpp…

template int test_map (int N, T *A) {

// 1. compute reference solution
synmod_map_seq (N, A);

// 2. compute solution with parallel module
T *dA;
GPU_alloc_dev_ptr (N*N, &dA);
GPU_copy_data_to_device (N*N, A, dA);
synmod_map_gpu (N, dA); 
GPU_copy_data_from_device (N*N, dA, A);
GPU_free_dev_ptr (&dA);


In synmod_map_seq.cpp file i write like this:

template static int synmod_map_seq_internal (int N, T *A) {
for (int i = 0; i < N; i++)
A[i] = -A[i];

return 0;

int synmod_map_seq (int N, int *A) {
return synmod_map_seq_internal (N, A);
int synmod_map_seq (int N, float *A) {
return synmod_map_seq_internal (N, A);
int synmod_map_seq (int N, double *A) {
return synmod_map_seq_internal (N, A);

in synmod_map_gpu.cu file i call synmod_map_gpu function from main.cpp
now problem is that i dont understand what to write for function “synmod_map_gpu”

How large are these matrices? Sample CUDA code for the batched inversion of small matrices (up to 70x70 or thereabouts) is available from the registered developer website. It uses a BSD license so you should be able to use the code for just about any kind of project.

so now what should i have to do??
yes matrix size is not more than 70x70…
you think that my code is not sufficient???
or can you me how to do matrix inversion with other method???

please at give me some solution for this…

As I said, sample code for batched matrix inversion is available from the registered developer website. If you are not a registered developer yet, you can sign up here:


Scroll down a little bit on that page to where it says:

Members of the CUDA Registered Developer Program can report issues and file bugs
Login or Join Today

The green phrases “login” and “Join Today” are clickable links. The registration process has been streamlined and should complete within one business day in most cases.