hello,
I want GPU program for matrix inversion ....
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"
Thank you..
