allow debugging of memory allocation

This commit is contained in:
Vítor Santos Costa
2013-10-16 14:52:54 +01:00
parent b50305a100
commit 94cb9b7563
6 changed files with 48 additions and 9 deletions

View File

@@ -37,10 +37,13 @@ int32_t Cuda_Erase(predicate *pred);
void init_cuda( void );
//#define DEBUG_INTERFACE 1
#if DEBUG_INTERFACE
static void
dump_mat(int32_t mat[], int32_t nrows, int32_t ncols)
{
return;
int32_t i, j;
for ( i=0; i< nrows; i++) {
printf("%d", mat[i*ncols]);
@@ -56,7 +59,7 @@ dump_vec(int32_t vec[], int32_t rows)
{
int32_t i = 1;
int32_t j = 0;
printf("%d", vec[0]);
for (j = 0; j < rows; j++) {
for ( ; vec[i]; i++ ) {
printf(", %d", vec[i]);