From 53d0c6b050ee99b2844646b4e8990cf82b451eb1 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Thu, 25 Apr 2002 13:29:27 -0500 Subject: [svn-r5261] Purpose: Code cleanup Description: Remove more debugging printf's that were ifdef'd out. Platforms tested: FreeBSD 4.5 (sleipnir) --- src/H5FDlog.c | 3 - src/H5Farray.c | 33 ------- src/H5HG.c | 9 -- src/H5Sall.c | 32 ------ src/H5Shyper.c | 291 +------------------------------------------------------ src/H5Spoint.c | 90 ----------------- src/H5Sprivate.h | 2 +- src/H5Sselect.c | 2 +- 8 files changed, 4 insertions(+), 458 deletions(-) diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 0e4a094..23a3943 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -809,9 +809,6 @@ H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hsize_t size) file->eoa = addr+size; -#ifdef QAK -printf("%s: flavor=%s, size=%lu\n",FUNC,flavors[type],(unsigned long)size); -#endif /* QAK */ /* Retain the (first) flavor of the information written to the file */ if(file->fa.flags!=0) { if(file->fa.flags&H5FD_LOG_FLAVOR) { diff --git a/src/H5Farray.c b/src/H5Farray.c index 6469c05..4408a2e 100644 --- a/src/H5Farray.c +++ b/src/H5Farray.c @@ -202,18 +202,6 @@ H5F_arr_read(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, if (H5D_CONTIGUOUS!=layout->type && H5FD_MPIO_COLLECTIVE==xfer_mode) HGOTO_ERROR (H5E_DATASET, H5E_READERROR, FAIL, "collective access on non-contiguous datasets not supported yet"); #endif -#ifdef QAK -{ - extern int qak_debug; - - if(qak_debug) { - printf("%s: layout->ndims=%d\n",FUNC,(int)layout->ndims); - for(u=0; undims; u++) - printf("%s: %u: hslab_size=%d, mem_size=%d, mem_offset=%d, file_offset=%d\n",FUNC,u,(int)_hslab_size[u],(int)mem_size[u],(int)mem_offset[u],(int)file_offset[u]); - printf("%s: *buf=%d, *(buf+1)=%d\n", FUNC,(int)*(const uint16_t *)buf,(int)*((const uint16 *)buf+1)); - } -} -#endif /* QAK */ /* Get necessary properties from property list */ if(H5P_get(dc_plist, H5D_CRT_EXT_FILE_LIST_NAME, &efl) < 0) @@ -291,11 +279,6 @@ H5F_arr_read(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, } #endif -#ifdef QAK - printf("%s: nelmts=%d, addr=%lu, elmt_size=%lu\n",FUNC,(int)nelmts,(unsigned long)addr,(unsigned long)elmt_size); - printf("%s: sieve_buf=%p, sieve_loc=%lu, sieve_size=%lu, sieve_buf_size=%lu, sieve_dirty=%u\n",FUNC,f->shared->sieve_buf,(unsigned long)f->shared->sieve_loc,(unsigned long)f->shared->sieve_size,(unsigned long)f->shared->sieve_buf_size,(unsigned)f->shared->sieve_dirty); - printf("%s: feature_flags=%lx\n",FUNC,(unsigned long)f->shared->lf->feature_flags); -#endif /* QAK */ #ifdef COALESCE_READS for (z=0, gather_reads = nelmts - 1; zndims=%d\n",FUNC,(int)layout->ndims); - for(i=0; indims; i++) - printf("%s: %d: hslab_size=%d, mem_size=%d, mem_offset=%d, " - "file_offset=%d\n", FUNC, i, (int)_hslab_size[i], - (int)mem_size[i],(int)mem_offset[i],(int)file_offset[i]); - if(qak_debug) { - printf("%s: *buf=%d, *(buf+1)=%d\n", FUNC, - (int)*(const uint16_t *)buf, (int)*((const uint16_t *)buf+1)); - } - } -#endif /* QAK */ - /* Get necessary properties from property list */ if(H5P_get(dc_plist, H5D_CRT_EXT_FILE_LIST_NAME, &efl) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get EFL value"); diff --git a/src/H5HG.c b/src/H5HG.c index b37c8fd..7218a82 100644 --- a/src/H5HG.c +++ b/src/H5HG.c @@ -121,9 +121,6 @@ H5HG_create (H5F_t *f, size_t size) if (sizeobj[0].size = size - H5HG_SIZEOF_HDR(f); -#ifdef QAK -printf("%s: heap->obj[0].size=%d, size=%d\n",FUNC,(int)heap->obj[0].size,(int)size); -#endif /* QAK */ assert(H5HG_ISALIGNED(heap->obj[0].size)); heap->obj[0].begin = p; UINT16ENCODE(p, 0); /*object ID*/ @@ -614,9 +608,6 @@ H5HG_insert (H5F_t *f, size_t size, void *obj, H5HG_t *hobj/*out*/) } assert (f->shared->ncwfs>0); assert (f->shared->cwfs[0]==heap); -#ifdef QAK -printf("%s: f->shared->cwfs[0]->obj[0].size=%d, size=%d, need=%d, H5HG_SIZEOF_HDR(f)=%d\n",FUNC,(int)f->shared->cwfs[0]->obj[0].size,(int)size,(int)need,(int)H5HG_SIZEOF_HDR(f)); -#endif /* QAK */ #ifdef OLD_WAY assert (f->shared->cwfs[0]->obj[0].size >= need+H5HG_SIZEOF_HDR(f)); #else /* OLD_WAY */ diff --git a/src/H5Sall.c b/src/H5Sall.c index 2efdfc9..52ecad8 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -119,9 +119,6 @@ H5S_all_favail (const H5S_t * UNUSED space, const H5S_sel_iter_t *sel_iter, hsiz assert (space && H5S_SEL_ALL==space->select.type); assert (sel_iter); -#ifdef QAK - printf("%s: sel_iter->all.elmt_left=%u, max=%u\n",FUNC,(unsigned)sel_iter->all.elmt_left,(unsigned)max); -#endif /* QAK */ FUNC_LEAVE (MIN(sel_iter->all.elmt_left,max)); } /* H5S_all_favail() */ @@ -454,9 +451,6 @@ H5S_all_read(H5F_t *f, const H5O_layout_t *layout, H5P_genplist_t *dc_plist, FUNC_ENTER(H5S_all_read, FAIL); -#ifdef QAK -printf("%s: check 1.0\n",FUNC); -#endif /* QAK */ /* Get information about memory and file */ for (u=0; uextent.u.simple.rank; u++) { switch(mem_space->select.type) { @@ -525,17 +519,6 @@ printf("%s: check 1.0\n",FUNC); file_offset[u] = 0; mem_offset[u] = 0; -#ifdef QAK -printf("%s: check 2.0\n",FUNC); -for (u=0; uextent.u.simple.rank; u++) - printf("size[%u]=%lu\n",u,(unsigned long)size[u]); -for (u=0; u<=mem_space->extent.u.simple.rank; u++) - printf("mem_size[%u]=%lu\n",u,(unsigned long)mem_size[u]); -for (u=0; u<=mem_space->extent.u.simple.rank; u++) - printf("mem_offset[%u]=%lu\n",u,(unsigned long)mem_offset[u]); -for (u=0; u<=mem_space->extent.u.simple.rank; u++) - printf("file_offset[%u]=%lu\n",u,(unsigned long)file_offset[u]); -#endif /* QAK */ /* Read data from the file */ if (H5F_arr_read(f, dxpl_id, layout, dc_plist, size, mem_size, mem_offset, file_offset, buf/*out*/)<0) @@ -588,10 +571,6 @@ H5S_all_write(H5F_t *f, const struct H5O_layout_t *layout, H5P_genplist_t *dc_pl FUNC_ENTER(H5S_all_write, FAIL); -#ifdef QAK -printf("%s: check 1.0\n",FUNC); -#endif /* QAK */ - /* Get information about memory and file */ for (u=0; uextent.u.simple.rank; u++) { switch(mem_space->select.type) { @@ -660,17 +639,6 @@ printf("%s: check 1.0\n",FUNC); file_offset[u] = 0; mem_offset[u] = 0; -#ifdef QAK -printf("%s: check 2.0\n",FUNC); -for (u=0; uextent.u.simple.rank; u++) - printf("size[%u]=%lu\n",u,(unsigned long)size[u]); -for (u=0; u<=mem_space->extent.u.simple.rank; u++) - printf("mem_size[%u]=%lu\n",u,(unsigned long)mem_size[u]); -for (u=0; u<=mem_space->extent.u.simple.rank; u++) - printf("mem_offset[%u]=%lu\n",u,(unsigned long)mem_offset[u]); -for (u=0; u<=mem_space->extent.u.simple.rank; u++) - printf("file_offset[%u]=%lu\n",u,(unsigned long)file_offset[u]); -#endif /* QAK */ /* Write data to the file */ if (H5F_arr_write(f, dxpl_id, layout, dc_plist, size, mem_size, mem_offset, file_offset, buf)<0) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 6663d98..b9652c0 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -98,7 +98,7 @@ H5FL_ARR_DEFINE_STATIC(hsize_t,-1); /* Declare a free list to manage arrays of H5S_hyper_dim_t */ H5FL_ARR_DEFINE_STATIC(H5S_hyper_dim_t,H5S_MAX_RANK); -#ifdef QAK +#ifdef H5S_HYPER_DEBUG static herr_t H5S_hyper_print_spans_helper(struct H5S_hyper_span_t *span,unsigned depth) { @@ -131,7 +131,7 @@ H5S_hyper_print_spans(const struct H5S_hyper_span_info_t *span_lst) FUNC_LEAVE(SUCCEED); } -#endif /* QAK */ +#endif /* H5S_HYPER_DEBUG */ /*------------------------------------------------------------------------- @@ -274,9 +274,6 @@ H5S_hyper_favail (const H5S_t * UNUSED space, assert (space && H5S_SEL_HYPERSLABS==space->select.type); assert (sel_iter); -#ifdef QAK - printf("%s: sel_iter->hyp.elmt_left=%u, max=%u\n",FUNC,(unsigned)sel_iter->hyp.elmt_left,(unsigned)max); -#endif /* QAK */ FUNC_LEAVE (MIN(sel_iter->hyp.elmt_left,max)); } /* H5S_hyper_favail() */ @@ -419,9 +416,6 @@ H5S_hyper_fread (H5F_t *f, const struct H5O_layout_t *layout, hssize_t ret_value=FAIL; FUNC_ENTER (H5S_hyper_fread, 0); -#ifdef QAK -printf("%s: Called!\n",FUNC); -#endif /* QAK */ /* Check args */ assert(f); @@ -880,20 +874,12 @@ H5S_hyper_fread_opt (H5F_t *f, const struct H5O_layout_t *layout, FUNC_ENTER (H5S_hyper_fread_opt, 0); -#ifdef QAK -printf("%s: Called!\n",FUNC); -#endif /* QAK */ /* Check if this is the first element read in from the hyperslab */ if(file_iter->hyp.pos[0]==(-1)) { for(u=0; uextent.u.simple.rank; u++) file_iter->hyp.pos[u]=file_space->select.sel_info.hslab.diminfo[u].start; } /* end if */ -#ifdef QAK -for(i=0; iextent.u.simple.rank; i++) - printf("%s: file_file->hyp.pos[%d]=%d\n",FUNC,(int)i,(int)file_iter->hyp.pos[i]); -#endif /* QAK */ - /* Get the hyperslab vector size */ if(TRUE!=H5P_isa_class(dxpl_id,H5P_DATASET_XFER) || NULL == (plist = H5I_object(dxpl_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a file access property list"); @@ -919,19 +905,11 @@ for(i=0; iextent.u.simple.rank; i++) /* Set the number of elements left for I/O */ H5_ASSIGN_OVERFLOW(io_left,nelmts,hsize_t,size_t); -#ifdef QAK - printf("%s: fast_dim=%d\n",FUNC,(int)fast_dim); - printf("%s: file_space->select.sel_info.hslab.diminfo[%d].start=%d\n",FUNC,(int)fast_dim,(int)file_space->select.sel_info.hslab.diminfo[fast_dim].start); - printf("%s: file_space->select.sel_info.hslab.diminfo[%d].stride=%d\n",FUNC,(int)fast_dim,(int)file_space->select.sel_info.hslab.diminfo[fast_dim].stride); -#endif /* QAK */ /* Check if we stopped in the middle of a sequence of elements */ if((file_iter->hyp.pos[fast_dim]-file_space->select.sel_info.hslab.diminfo[fast_dim].start)%file_space->select.sel_info.hslab.diminfo[fast_dim].stride!=0 || ((file_iter->hyp.pos[fast_dim]!=file_space->select.sel_info.hslab.diminfo[fast_dim].start) && file_space->select.sel_info.hslab.diminfo[fast_dim].stride==1)) { hsize_t leftover; /* The number of elements left over from the last sequence */ -#ifdef QAK -printf("%s: Check 1.0\n",FUNC); -#endif /* QAK */ /* Calculate the number of elements left in the sequence */ if(file_space->select.sel_info.hslab.diminfo[fast_dim].stride==1) leftover=file_space->select.sel_info.hslab.diminfo[fast_dim].block-(file_iter->hyp.pos[fast_dim]-file_space->select.sel_info.hslab.diminfo[fast_dim].start); @@ -949,17 +927,10 @@ printf("%s: Check 1.0\n",FUNC); /* Add in the selection offset */ for(i=0; iselect.offset[i]; -#ifdef QAK -for(i=0; i0) { /* Just in case the "remainder" above filled the buffer */ -#ifdef QAK -printf("%s: Check 2.0, ndims=%d, io_left=%d, nelmts=%d\n",FUNC,(int)ndims,(int)io_left,(int)nelmts); -#endif /* QAK */ /* Compute the arrays to perform I/O on */ /* Copy the location of the point to get */ HDmemcpy(offset, file_iter->hyp.pos,ndims*sizeof(hssize_t)); offset[ndims] = 0; -#ifdef QAK -for(i=0; ihyp.pos[i]-file_space->select.sel_info.hslab.diminfo[i].start)%file_space->select.sel_info.hslab.diminfo[i].stride; tmp_block[i] = (file_iter->hyp.pos[i]-file_space->select.sel_info.hslab.diminfo[i].start)/file_space->select.sel_info.hslab.diminfo[i].stride; } /* end for */ -#ifdef QAK -for(i=0; iextent.u.simple.rank; i++) - printf("%s: diminfo: start[%d]=%d, stride[%d]=%d, block[%d]=%d, count[%d]=%d\n",FUNC, - (int)i,(int)file_space->select.sel_info.hslab.diminfo[i].start, - (int)i,(int)file_space->select.sel_info.hslab.diminfo[i].stride, - (int)i,(int)file_space->select.sel_info.hslab.diminfo[i].block, - (int)i,(int)file_space->select.sel_info.hslab.diminfo[i].count); -#endif /* QAK */ /* Set the local copy of the diminfo pointer */ tdiminfo=file_space->select.sel_info.hslab.diminfo; @@ -1500,9 +1446,6 @@ H5S_hyper_fwrite (H5F_t *f, const struct H5O_layout_t *layout, hssize_t ret_value=FAIL; FUNC_ENTER (H5S_hyper_fwrite, 0); -#ifdef QAK -printf("%s: Called!\n",FUNC); -#endif /* QAK */ /* Check args */ assert(f); @@ -1961,20 +1904,12 @@ H5S_hyper_fwrite_opt (H5F_t *f, const struct H5O_layout_t *layout, FUNC_ENTER (H5S_hyper_fwrite_opt, 0); -#ifdef QAK -printf("%s: Called!, file_iter->hyp.pos[0]==%d\n",FUNC,(int)file_iter->hyp.pos[0]); -#endif /* QAK */ /* Check if this is the first element written from the hyperslab */ if(file_iter->hyp.pos[0]==(-1)) { for(u=0; uextent.u.simple.rank; u++) file_iter->hyp.pos[u]=file_space->select.sel_info.hslab.diminfo[u].start; } /* end if */ -#ifdef QAK -for(i=0; iextent.u.simple.rank; i++) - printf("%s: file_file->hyp.pos[%d]=%d\n",FUNC,(int)i,(int)file_iter->hyp.pos[i]); -#endif /* QAK */ - /* Get the hyperslab vector size */ if(TRUE!=H5P_isa_class(dxpl_id,H5P_DATASET_XFER) || NULL == (plist = H5I_object(dxpl_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a file access property list"); @@ -2000,19 +1935,11 @@ for(i=0; iextent.u.simple.rank; i++) /* Set the number of elements left for I/O */ H5_ASSIGN_OVERFLOW(io_left,nelmts,hsize_t,size_t); -#ifdef QAK - printf("%s: fast_dim=%d\n",FUNC,(int)fast_dim); - printf("%s: file_space->select.sel_info.hslab.diminfo[%d].start=%d\n",FUNC,(int)fast_dim,(int)file_space->select.sel_info.hslab.diminfo[fast_dim].start); - printf("%s: file_space->select.sel_info.hslab.diminfo[%d].stride=%d\n",FUNC,(int)fast_dim,(int)file_space->select.sel_info.hslab.diminfo[fast_dim].stride); -#endif /* QAK */ /* Check if we stopped in the middle of a sequence of elements */ if((file_iter->hyp.pos[fast_dim]-file_space->select.sel_info.hslab.diminfo[fast_dim].start)%file_space->select.sel_info.hslab.diminfo[fast_dim].stride!=0 || ((file_iter->hyp.pos[fast_dim]!=file_space->select.sel_info.hslab.diminfo[fast_dim].start) && file_space->select.sel_info.hslab.diminfo[fast_dim].stride==1)) { hsize_t leftover; /* The number of elements left over from the last sequence */ -#ifdef QAK -printf("%s: Check 1.0\n",FUNC); -#endif /* QAK */ /* Calculate the number of elements left in the sequence */ if(file_space->select.sel_info.hslab.diminfo[fast_dim].stride==1) leftover=file_space->select.sel_info.hslab.diminfo[fast_dim].block-(file_iter->hyp.pos[fast_dim]-file_space->select.sel_info.hslab.diminfo[fast_dim].start); @@ -2030,17 +1957,10 @@ printf("%s: Check 1.0\n",FUNC); /* Add in the selection offset */ for(i=0; iselect.offset[i]; -#ifdef QAK -for(i=0; i0) { /* Just in case the "remainder" above emptied the buffer */ -#ifdef QAK -printf("%s: Check 2.0, ndims=%d, io_left=%d, nelmts=%d\n",FUNC,(int)ndims,(int)io_left,(int)nelmts); -#endif /* QAK */ /* Compute the arrays to perform I/O on */ /* Copy the location of the point to get */ HDmemcpy(offset, file_iter->hyp.pos,ndims*sizeof(hssize_t)); offset[ndims] = 0; -#ifdef QAK -for(i=0; ihyp.pos[i]-file_space->select.sel_info.hslab.diminfo[i].start)%file_space->select.sel_info.hslab.diminfo[i].stride; tmp_block[i] = (file_iter->hyp.pos[i]-file_space->select.sel_info.hslab.diminfo[i].start)/file_space->select.sel_info.hslab.diminfo[i].stride; } /* end for */ -#ifdef QAK -for(i=0; iextent.u.simple.rank; i++) - printf("%s: diminfo: start[%d]=%d, stride[%d]=%d, block[%d]=%d, count[%d]=%d\n",FUNC, - (int)i,(int)file_space->select.sel_info.hslab.diminfo[i].start, - (int)i,(int)file_space->select.sel_info.hslab.diminfo[i].stride, - (int)i,(int)file_space->select.sel_info.hslab.diminfo[i].block, - (int)i,(int)file_space->select.sel_info.hslab.diminfo[i].count); -#endif /* QAK */ /* Set the local copy of the diminfo pointer */ tdiminfo=file_space->select.sel_info.hslab.diminfo; @@ -2568,9 +2463,6 @@ H5S_hyper_mread (const void *_buf, size_t elmt_size, const H5S_t *space, hssize_t ret_value=FAIL; FUNC_ENTER (H5S_hyper_mread, FAIL); -#ifdef QAK -printf("%s: Called!\n",FUNC); -#endif /* QAK */ /* Check args */ assert(src); @@ -2958,20 +2850,12 @@ H5S_hyper_mread_opt (const void *_buf, size_t elmt_size, FUNC_ENTER (H5S_hyper_mread_opt, 0); -#ifdef QAK -printf("%s: Called!, nelmts=%lu, elmt_size=%d\n",FUNC,(unsigned long)nelmts,(int)elmt_size); -#endif /* QAK */ /* Check if this is the first element read in from the hyperslab */ if(mem_iter->hyp.pos[0]==(-1)) { for(u=0; uextent.u.simple.rank; u++) mem_iter->hyp.pos[u]=mem_space->select.sel_info.hslab.diminfo[u].start; } /* end if */ -#ifdef QAK -for(u=0; uextent.u.simple.rank; u++) - printf("%s: mem_file->hyp.pos[%u]=%d\n",FUNC,(unsigned)u,(int)mem_iter->hyp.pos[u]); -#endif /* QAK */ - /* Set the aliases for a few important dimension ranks */ fast_dim=mem_space->extent.u.simple.rank-1; ndims=mem_space->extent.u.simple.rank; @@ -2985,10 +2869,6 @@ for(u=0; uextent.u.simple.rank; u++) slab[i]=acc*elmt_size; acc*=mem_size[i]; } /* end for */ -#ifdef QAK -for(i=0; ihyp.pos[fast_dim]!=mem_space->select.sel_info.hslab.diminfo[fast_dim].start) && mem_space->select.sel_info.hslab.diminfo[fast_dim].stride==1)) { size_t leftover; /* The number of elements left over from the last sequence */ -#ifdef QAK -printf("%s: Check 1.0, io_left=%lu\n",FUNC,(unsigned long)io_left); -#endif /* QAK */ /* Calculate the number of elements left in the sequence */ if(mem_space->select.sel_info.hslab.diminfo[fast_dim].stride==1) leftover=mem_space->select.sel_info.hslab.diminfo[fast_dim].block-(mem_iter->hyp.pos[fast_dim]-mem_space->select.sel_info.hslab.diminfo[fast_dim].start); @@ -3053,9 +2930,6 @@ printf("%s: Check 1.0, io_left=%lu\n",FUNC,(unsigned long)io_left); * until the buffer fills up. */ if(io_left>0) { /* Just in case the "remainder" above filled the buffer */ -#ifdef QAK -printf("%s: Check 2.0, io_left=%lu\n",FUNC,(unsigned long)io_left); -#endif /* QAK */ /* Compute the arrays to perform I/O on */ /* Copy the location of the point to get */ HDmemcpy(offset, mem_iter->hyp.pos,ndims*sizeof(hssize_t)); @@ -3080,19 +2954,6 @@ printf("%s: Check 2.0, io_left=%lu\n",FUNC,(unsigned long)io_left); /* Set the number of actual bytes */ actual_bytes=actual_read*elmt_size; -#ifdef QAK -printf("%s: src=%p, actual_bytes=%u\n",FUNC,src,(int)actual_bytes); -#endif /* QAK */ - -#ifdef QAK -printf("%s: actual_read=%d\n",FUNC,(int)actual_read); -for(i=0; iselect.sel_info.hslab.diminfo[i].start, - (int)i,(int)mem_space->select.sel_info.hslab.diminfo[i].stride, - (int)i,(int)mem_space->select.sel_info.hslab.diminfo[i].block, - (int)i,(int)mem_space->select.sel_info.hslab.diminfo[i].count); -#endif /* QAK */ /* Set the local copy of the diminfo pointer */ tdiminfo=mem_space->select.sel_info.hslab.diminfo; @@ -3143,10 +3004,6 @@ for(i=0; ihyp.pos[0]==(-1)) { for(u=0; uextent.u.simple.rank; u++) mem_iter->hyp.pos[u]=mem_space->select.sel_info.hslab.diminfo[u].start; } /* end if */ -#ifdef QAK -for(u=0; uextent.u.simple.rank; u++) - printf("%s: mem_file->hyp.pos[%u]=%d\n",FUNC,(unsigned)u,(int)mem_iter->hyp.pos[u]); -#endif /* QAK */ - /* Set the aliases for a few important dimension ranks */ fast_dim=mem_space->extent.u.simple.rank-1; ndims=mem_space->extent.u.simple.rank; @@ -3858,10 +3704,6 @@ for(u=0; uextent.u.simple.rank; u++) slab[i]=acc*elmt_size; acc*=mem_size[i]; } /* end for */ -#ifdef QAK -for(i=0; ihyp.pos[fast_dim]!=mem_space->select.sel_info.hslab.diminfo[fast_dim].start) && mem_space->select.sel_info.hslab.diminfo[fast_dim].stride==1)) { size_t leftover; /* The number of elements left over from the last sequence */ -#ifdef QAK -printf("%s: Check 1.0, io_left=%lu\n",FUNC,(unsigned long)io_left); -#endif /* QAK */ /* Calculate the number of elements left in the sequence */ if(mem_space->select.sel_info.hslab.diminfo[fast_dim].stride==1) leftover=mem_space->select.sel_info.hslab.diminfo[fast_dim].block-(mem_iter->hyp.pos[fast_dim]-mem_space->select.sel_info.hslab.diminfo[fast_dim].start); @@ -3926,9 +3765,6 @@ printf("%s: Check 1.0, io_left=%lu\n",FUNC,(unsigned long)io_left); * until the buffer fills up. */ if(io_left>0) { /* Just in case the "remainder" above filled the buffer */ -#ifdef QAK -printf("%s: Check 2.0, io_left=%lu\n",FUNC,(unsigned long)io_left); -#endif /* QAK */ /* Compute the arrays to perform I/O on */ /* Copy the location of the point to get */ HDmemcpy(offset, mem_iter->hyp.pos,ndims*sizeof(hssize_t)); @@ -3953,19 +3789,6 @@ printf("%s: Check 2.0, io_left=%lu\n",FUNC,(unsigned long)io_left); /* Set the number of actual bytes */ actual_bytes=actual_write*elmt_size; -#ifdef QAK -printf("%s: dst=%p, actual_bytes=%u\n",FUNC,dst,(int)actual_bytes); -#endif /* QAK */ - -#ifdef QAK -printf("%s: actual_write=%d\n",FUNC,(int)actual_write); -for(i=0; iselect.sel_info.hslab.diminfo[i].start, - (int)i,(int)mem_space->select.sel_info.hslab.diminfo[i].stride, - (int)i,(int)mem_space->select.sel_info.hslab.diminfo[i].block, - (int)i,(int)mem_space->select.sel_info.hslab.diminfo[i].count); -#endif /* QAK */ /* Set the local copy of the diminfo pointer */ tdiminfo=mem_space->select.sel_info.hslab.diminfo; @@ -4016,10 +3839,6 @@ for(i=0; ihead; span_b=b_spans->head; @@ -7193,17 +6991,11 @@ printf("%s: check 4.2\n",FUNC); /* Work through the list of spans in the new list */ while(span_a!=NULL && span_b!=NULL) { -#ifdef QAK -printf("%s: check 4.3, span_a=%p, span_b=%p\n",FUNC,span_a,span_b); -#endif /* QAK */ /* Check if span 'a' is completely before span 'b' */ /* AAAAAAA */ /* <-----------------------------------> */ /* BBBBBBBBBB */ if(span_a->highlow) { -#ifdef QAK -printf("%s: check 4.3.1, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, %ld)\n",FUNC,(long)span_a->low,(long)span_a->high,(long)span_b->low,(long)span_b->high); -#endif /* QAK */ /* Copy span 'a' and add to a_not_b list */ /* Merge/add span 'a' with/to a_not_b list */ @@ -7219,9 +7011,6 @@ printf("%s: check 4.3.1, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%l /* <-----------------------------------> */ /* BBBBBBBBBB */ else if(span_a->lowlow && (span_a->high>=span_b->low && span_a->high<=span_b->high)) { -#ifdef QAK -printf("%s: check 4.3.2, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, %ld)\n",FUNC,(long)span_a->low,(long)span_a->high,(long)span_b->low,(long)span_b->high); -#endif /* QAK */ /* Split span 'a' into two parts at the low bound of span 'b' */ /* Merge/add lower part of span 'a' with/to a_not_b list */ @@ -7309,9 +7098,6 @@ printf("%s: check 4.3.2, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%l /* <-----------------------------------> */ /* BBBBBBBBBB */ else if(span_a->lowlow && span_a->high>span_b->high) { -#ifdef QAK -printf("%s: check 4.3.3, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, %ld)\n",FUNC,(long)span_a->low,(long)span_a->high,(long)span_b->low,(long)span_b->high); -#endif /* QAK */ /* Split off lower part of span 'a' at lower span of span 'b' */ /* Merge/add lower part of span 'a' with/to a_not_b list */ @@ -7389,9 +7175,6 @@ printf("%s: check 4.3.3, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%l /* <-----------------------------------> */ /* BBBBBBBBBB */ else if(span_a->low>=span_b->low && span_a->high<=span_b->high) { -#ifdef QAK -printf("%s: check 4.3.4, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, %ld)\n",FUNC,(long)span_a->low,(long)span_a->high,(long)span_b->low,(long)span_b->high); -#endif /* QAK */ /* Split off lower part of span 'b' at lower span of span 'a' */ /* Check if there is actually a lower part of span 'b' to split off */ @@ -7484,9 +7267,6 @@ printf("%s: check 4.3.4, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%l /* <-----------------------------------> */ /* BBBBBBBBBB */ else if((span_a->low>=span_b->low && span_a->low<=span_b->high) && span_a->high>span_b->high) { -#ifdef QAK -printf("%s: check 4.3.5, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, %ld)\n",FUNC,(long)span_a->low,(long)span_a->high,(long)span_b->low,(long)span_b->high); -#endif /* QAK */ /* Check if there is actually a lower part of span 'b' to split off */ if(span_a->low>span_b->low) { /* Split off lower part of span 'b' at lower span of span 'a' */ @@ -7570,9 +7350,6 @@ printf("%s: check 4.3.5, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%l /* <-----------------------------------> */ /* BBBBBBBBBB */ else { -#ifdef QAK -printf("%s: check 4.3.6, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, %ld)\n",FUNC,(long)span_a->low,(long)span_a->high,(long)span_b->low,(long)span_b->high); -#endif /* QAK */ /* Copy span 'b' and add to b_not_a list */ /* Merge/add span 'b' with/to b_not_a list */ @@ -7583,15 +7360,9 @@ printf("%s: check 4.3.6, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%l H5S_hyper_recover_span(&recover_b,&span_b,span_b->next); } /* end else */ } /* end while */ -#ifdef QAK -printf("%s: check 5.0, span_a=%p, span_b=%p\n",FUNC,span_a,span_b); -#endif /* QAK */ /* Clean up 'a' spans which haven't been covered yet */ if(span_a!=NULL && span_b==NULL) { -#ifdef QAK -printf("%s: check 6.0, span_a=%p, span_b=%p\n",FUNC,span_a,span_b); -#endif /* QAK */ while(span_a!=NULL) { /* Copy span 'a' and add to a_not_b list */ @@ -7605,9 +7376,6 @@ printf("%s: check 6.0, span_a=%p, span_b=%p\n",FUNC,span_a,span_b); } /* end if */ /* Clean up 'b' spans which haven't been covered yet */ else if(span_a==NULL && span_b!=NULL) { -#ifdef QAK -printf("%s: check 7.0, span_a=%p, span_b=%p\n",FUNC,span_a,span_b); -#endif /* QAK */ while(span_b!=NULL) { /* Copy span 'b' and add to b_not_a list */ @@ -7665,18 +7433,11 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf FUNC_ENTER (H5S_hyper_merge_spans_helper, NULL); -#ifdef QAK -printf("%s: a_spans=%p, b_spans=%p\n",FUNC,a_spans,b_spans); -#endif /* QAK */ - /* Make certain both 'a' & 'b' spans have down span trees or neither does */ assert((a_spans!=NULL && b_spans!=NULL) || (a_spans==NULL && b_spans==NULL)); /* Check if the span trees for the 'a' span and the 'b' span are the same */ if(H5S_hyper_cmp_spans(a_spans,b_spans)==TRUE) { -#ifdef QAK -printf("%s: check 0.5\n",FUNC); -#endif /* QAK */ if(a_spans==NULL) merged_spans=NULL; else { @@ -7686,9 +7447,6 @@ printf("%s: check 0.5\n",FUNC); } /* end else */ } /* end if */ else { -#ifdef QAK -printf("%s: check 1.0\n",FUNC); -#endif /* QAK */ /* Get the pointers to the 'a' and 'b' span lists */ span_a=a_spans->head; span_b=b_spans->head; @@ -7701,17 +7459,11 @@ printf("%s: check 1.0\n",FUNC); /* Work through the list of spans in the new list */ while(span_a!=NULL && span_b!=NULL) { -#ifdef QAK -printf("%s: check 3.0, span_a=%p, span_b=%p\n",FUNC,span_a,span_b); -#endif /* QAK */ /* Check if the 'a' span is completely before 'b' span */ /* AAAAAAA */ /* <-----------------------------------> */ /* BBBBBBBBBB */ if(span_a->highlow) { -#ifdef QAK -printf("%s: check 3.1, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, %ld)\n",FUNC,(long)span_a->low,(long)span_a->high,(long)span_b->low,(long)span_b->high); -#endif /* QAK */ /* Merge/add span 'a' with/to the merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,span_a->down,NULL)==FAIL) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span"); @@ -7725,9 +7477,6 @@ printf("%s: check 3.1, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, /* <-----------------------------------> */ /* BBBBBBBBBB */ else if(span_a->lowlow && (span_a->high>=span_b->low && span_a->high<=span_b->high)) { -#ifdef QAK -printf("%s: check 3.2, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, %ld)\n",FUNC,(long)span_a->low,(long)span_a->high,(long)span_b->low,(long)span_b->high); -#endif /* QAK */ /* Check if span 'a' and span 'b' down spans are equal */ if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) { /* Merge/add copy of span 'a' with/to merged spans */ @@ -7777,9 +7526,6 @@ printf("%s: check 3.2, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, /* <-----------------------------------> */ /* BBBBBBBBBB */ else if(span_a->lowlow && span_a->high>span_b->high) { -#ifdef QAK -printf("%s: check 3.3, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, %ld)\n",FUNC,(long)span_a->low,(long)span_a->high,(long)span_b->low,(long)span_b->high); -#endif /* QAK */ /* Check if span 'a' and span 'b' down spans are equal */ if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) { /* Merge/add copy of lower & middle parts of span 'a' to merged spans */ @@ -7820,9 +7566,6 @@ printf("%s: check 3.3, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, /* <-----------------------------------> */ /* BBBBBBBBBB */ else if(span_a->low>=span_b->low && span_a->high<=span_b->high) { -#ifdef QAK -printf("%s: check 3.4, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, %ld)\n",FUNC,(long)span_a->low,(long)span_a->high,(long)span_b->low,(long)span_b->high); -#endif /* QAK */ /* Check if span 'a' and span 'b' down spans are equal */ if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) { /* Merge/add copy of lower & middle parts of span 'b' to merged spans */ @@ -7878,9 +7621,6 @@ printf("%s: check 3.4, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, /* <-----------------------------------> */ /* BBBBBBBBBB */ else if((span_a->low>=span_b->low && span_a->low<=span_b->high) && span_a->high>span_b->high) { -#ifdef QAK -printf("%s: check 3.5, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, %ld)\n",FUNC,(long)span_a->low,(long)span_a->high,(long)span_b->low,(long)span_b->high); -#endif /* QAK */ /* Check if span 'a' and span 'b' down spans are equal */ if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) { /* Merge/add copy of span 'b' to merged spans if so */ @@ -7927,9 +7667,6 @@ printf("%s: check 3.5, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, /* <-----------------------------------> */ /* BBBBBBBBBB */ else { -#ifdef QAK -printf("%s: check 3.6, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, %ld)\n",FUNC,(long)span_a->low,(long)span_a->high,(long)span_b->low,(long)span_b->high); -#endif /* QAK */ /* Merge/add span 'b' with the merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,span_b->down,NULL)==FAIL) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span"); @@ -7938,16 +7675,10 @@ printf("%s: check 3.6, span_a->(low, high)=(%ld, %ld), span_b->(low, high)=(%ld, H5S_hyper_recover_span(&recover_b,&span_b,span_b->next); } /* end else */ } /* end while */ -#ifdef QAK -printf("%s: check 4.0, span_a=%p, span_b=%p\n",FUNC,span_a,span_b); -#endif /* QAK */ /* Clean up 'a' spans which haven't been added to the list of merged spans */ if(span_a!=NULL && span_b==NULL) { while(span_a!=NULL) { -#ifdef QAK -printf("%s: check 5.0, span_a->(low, high)=(%ld, %ld)\n",FUNC,(long)span_a->low,(long)span_a->high); -#endif /* QAK */ /* Merge/add all 'a' spans into the merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,span_a->down,NULL)==FAIL) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span"); @@ -7960,9 +7691,6 @@ printf("%s: check 5.0, span_a->(low, high)=(%ld, %ld)\n",FUNC,(long)span_a->low, /* Clean up 'b' spans which haven't been added to the list of merged spans */ if(span_a==NULL && span_b!=NULL) { while(span_b!=NULL) { -#ifdef QAK -printf("%s: check 6.0, span_b->(low, high)=(%ld, %ld)\n",FUNC,(long)span_b->low,(long)span_b->high); -#endif /* QAK */ /* Merge/add all 'b' spans into the merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,span_b->down,NULL)==FAIL) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span"); @@ -7971,9 +7699,6 @@ printf("%s: check 6.0, span_b->(low, high)=(%ld, %ld)\n",FUNC,(long)span_b->low, H5S_hyper_recover_span(&recover_b,&span_b,span_b->next); } /* end while */ } /* end if */ -#ifdef QAK -printf("%s: check 7.0, span_a=%p, span_b=%p\n",FUNC,span_a,span_b); -#endif /* QAK */ } /* end else */ /* Success! */ @@ -8017,9 +7742,6 @@ H5S_hyper_merge_spans (H5S_t *space, H5S_hyper_span_info_t *new_spans) assert (space); assert (new_spans); -#ifdef QAK -printf("%s: space->select.sel_info.hslab.span_lst=%p, new_spans=%p\n",FUNC,space->select.sel_info.hslab.span_lst,new_spans); -#endif /* QAK */ /* If this is the first span tree in the hyperslab selection, just use it */ if(space->select.sel_info.hslab.span_lst==NULL) { space->select.sel_info.hslab.span_lst=H5S_hyper_copy_span(new_spans); @@ -8254,9 +7976,6 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op, assert(_count); assert(_block); -#ifdef QAK -printf("%s: space=%p\n",FUNC,space); -#endif /* QAK */ /* Optimize hyperslab selection to merge contiguous blocks */ for(u=0; uextent.u.simple.rank; u++) { /* contiguous hyperslabs have the block size equal to the stride */ @@ -8275,9 +7994,6 @@ printf("%s: space=%p\n",FUNC,space); /* Generate span tree for new hyperslab information */ if((new_spans=H5S_hyper_make_spans(space->extent.u.simple.rank,start,stride,count,block))==NULL) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't create hyperslab information"); -#ifdef QAK -printf("%s: new_spans=%p\n",FUNC,new_spans); -#endif /* QAK */ /* Generate list of blocks to add/remove based on selection operation */ if(op==H5S_SELECT_SET) { @@ -8405,9 +8121,6 @@ printf("%s: new_spans=%p\n",FUNC,new_spans); default: HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation"); } /* end switch */ -#ifdef QAK -printf("%s: a_not_b=%p, a_and_b=%p, b_not_a=%p\n",FUNC,a_not_b,a_and_b,b_not_a); -#endif /* QAK */ /* Free the hyperslab trees generated from the clipping algorithm */ if(a_not_b) H5S_hyper_free_span_info(a_not_b); diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 2fa6a2d..efe6df0 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -88,9 +88,6 @@ H5S_point_init (const H5S_t *space, size_t UNUSED elmt_size, H5S_sel_iter_t *sel assert (space && H5S_SEL_POINTS==space->select.type); assert (sel_iter); -#ifdef QAK - printf("%s: check 1.0\n",FUNC); -#endif /* QAK */ /* Initialize the number of points to iterate over */ sel_iter->pnt.elmt_left=space->select.num_elem; @@ -134,9 +131,6 @@ herr_t H5S_point_add (H5S_t *space, H5S_seloper_t op, size_t num_elem, const hss assert(coord); assert(op==H5S_SELECT_SET || op==H5S_SELECT_APPEND || op==H5S_SELECT_PREPEND); -#ifdef QAK - printf("%s: check 1.0\n",FUNC); -#endif /* QAK */ top=curr=NULL; for(i=0; iextent.u.simple.rank); -#endif /* QAK */ if((new_node->pnt = H5MM_malloc(space->extent.u.simple.rank*sizeof(hssize_t)))==NULL) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate coordinate information"); -#ifdef QAK - printf("%s: check 1.2\n",FUNC); -#endif /* QAK */ /* Copy over the coordinates */ HDmemcpy(new_node->pnt,coord+(i*space->extent.u.simple.rank),(space->extent.u.simple.rank*sizeof(hssize_t))); -#ifdef QAK - printf("%s: check 1.3\n",FUNC); - { - int j; - - for(j=0; jextent.u.simple.rank; j++) { - printf("%s: pnt[%d]=%d\n",FUNC,(int)j,(int)new_node->pnt[j]); - printf("%s: coord[%d][%d]=%d\n", - FUNC, (int)i, (int)j, - (int)*(coord+(i*space->extent.u.simple.rank)+j)); - } - } -#endif /* QAK */ /* Link into list */ new_node->next=NULL; @@ -179,9 +153,6 @@ herr_t H5S_point_add (H5S_t *space, H5S_seloper_t op, size_t num_elem, const hss curr->next=new_node; curr=new_node; } /* end for */ -#ifdef QAK - printf("%s: check 2.0\n",FUNC); -#endif /* QAK */ /* Insert the list of points selected in the proper place */ if(op==H5S_SELECT_SET || op==H5S_SELECT_PREPEND) { @@ -209,9 +180,6 @@ herr_t H5S_point_add (H5S_t *space, H5S_seloper_t op, size_t num_elem, const hss space->select.num_elem+=num_elem; ret_value=SUCCEED; -#ifdef QAK - printf("%s: check 3.0\n",FUNC); -#endif /* QAK */ done: FUNC_LEAVE (ret_value); @@ -241,9 +209,6 @@ H5S_point_favail (const H5S_t * UNUSED space, assert (space && H5S_SEL_POINTS==space->select.type); assert (sel_iter); -#ifdef QAK - printf("%s: check 1.0, ret=%d\n", FUNC,(int)MIN(sel_iter->pnt.elmt_left,max)); -#endif /* QAK */ FUNC_LEAVE (MIN(sel_iter->pnt.elmt_left,max)); } /* H5S_point_favail() */ @@ -303,9 +268,6 @@ H5S_point_fgath (H5F_t *f, const struct H5O_layout_t *layout, assert (nelmts>0); assert (buf); -#ifdef QAK - printf("%s: check 1.0\n",FUNC); -#endif /* QAK */ ndims=file_space->extent.u.simple.rank; /* initialize hyperslab size and offset in memory buffer */ for(u=0; u0); assert (tconv_buf); -#ifdef QAK - printf("%s: check 1.0\n",FUNC); -#endif /* QAK */ /* Get the dataspace dimensions */ if ((space_ndims=H5S_get_simple_extent_dims (mem_space, mem_size, NULL))<0) HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, 0, "unable to retrieve data space dimensions"); @@ -497,9 +456,6 @@ H5S_point_mgath (const void *_buf, size_t elmt_size, acc*=mem_size[i]; } /* end for */ -#ifdef QAK - printf("%s: check 2.0, acc=%d, off=%d\n",FUNC,(int)acc,(int)off); -#endif /* QAK */ /* Copy the elements into the type conversion buffer */ HDmemcpy(tconv_buf,buf+off,elmt_size); @@ -557,9 +513,6 @@ H5S_point_mscat (const void *_tconv_buf, size_t elmt_size, assert (nelmts>0); assert (buf); -#ifdef QAK - printf("%s: check 1.0\n",FUNC); -#endif /* QAK */ /* Get the dataspace dimensions */ if ((space_ndims=H5S_get_simple_extent_dims (mem_space, mem_size, NULL))<0) HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to retrieve data space dimensions"); @@ -660,9 +613,6 @@ H5S_point_npoints (const H5S_t *space) /* Check args */ assert (space); -#ifdef QAK - printf("%s: check 1.0, nelmts=%d\n",FUNC,(int)space->select.num_elem); -#endif /* QAK */ FUNC_LEAVE (space->select.num_elem); } /* H5S_point_npoints() */ @@ -696,9 +646,6 @@ H5S_point_copy (H5S_t *dst, const H5S_t *src) assert(src); assert(dst); -#ifdef QAK - printf("%s: check 1.0\n",FUNC); -#endif /* QAK */ /* Allocate room for the head of the point list */ if((dst->select.sel_info.pnt_lst=H5MM_malloc(sizeof(H5S_pnt_list_t)))==NULL) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, @@ -717,15 +664,6 @@ H5S_point_copy (H5S_t *dst, const H5S_t *src) HDmemcpy(new_node->pnt,curr->pnt,(src->extent.u.simple.rank*sizeof(hssize_t))); new_node->next=NULL; -#ifdef QAK - printf("%s: check 5.0\n",FUNC); - { - int i; - for(i=0; iextent.u.simple.rank; i++) - printf("%s: check 5.1, new_node->pnt[%d]=%d\n",FUNC,i,(int)new_node->pnt[i]); - } -#endif /* QAK */ - /* Keep the order the same when copying */ if(new_head==NULL) new_head=dst->select.sel_info.pnt_lst->head=new_node; @@ -736,10 +674,6 @@ H5S_point_copy (H5S_t *dst, const H5S_t *src) curr=curr->next; } /* end while */ -#ifdef QAK - printf("%s: check 10.0 src->select.sel_info.pnt_lst=%p, dst->select.sel_info.pnt_lst=%p\n",FUNC,src->select.sel_info.pnt_lst,dst->select.sel_info.pnt_lst); - printf("%s: check 10.0 src->select.sel_info.pnt_lst->head=%p, dst->select.sel_info.pnt_lst->head=%p\n",FUNC,src->select.sel_info.pnt_lst->head,dst->select.sel_info.pnt_lst->head); -#endif /* QAK */ done: FUNC_LEAVE (ret_value); @@ -776,20 +710,11 @@ H5S_point_select_valid (const H5S_t *space) assert(space); -#ifdef QAK -printf("%s: check 1.0\n",FUNC); -#endif /* QAK */ /* Check each point to determine whether selection+offset is within extent */ curr=space->select.sel_info.pnt_lst->head; while(curr!=NULL) { /* Check each dimension */ for(u=0; uextent.u.simple.rank; u++) { -#ifdef QAK -printf("%s: check 2.0\n",FUNC); -printf("%s: curr->pnt[%u]=%d\n",FUNC,(unsigned)u,(int)curr->pnt[u]); -printf("%s: space->select.offset[%u]=%d\n",FUNC,(unsigned)u,(int)space->select.offset[u]); -printf("%s: space->extent.u.simple.size[%u]=%d\n",FUNC,(unsigned)u,(int)space->extent.u.simple.size[u]); -#endif /* QAK */ /* Check if an offset has been defined */ /* Bounds check the selected point + offset against the extent */ if(((curr->pnt[u]+space->select.offset[u])>(hssize_t)space->extent.u.simple.size[u]) @@ -801,9 +726,6 @@ printf("%s: space->extent.u.simple.size[%u]=%d\n",FUNC,(unsigned)u,(int)space->e curr=curr->next; } /* end while */ -#ifdef QAK -printf("%s: check 3.0\n",FUNC); -#endif /* QAK */ FUNC_LEAVE (ret_value); } /* end H5S_point_select_valid() */ @@ -1207,9 +1129,6 @@ herr_t H5S_select_elements (H5S_t *space, H5S_seloper_t op, size_t num_elem, assert(coord); assert(op==H5S_SELECT_SET || op==H5S_SELECT_APPEND || op==H5S_SELECT_PREPEND); -#ifdef QAK - printf("%s: check 1.0\n",FUNC); -#endif /* QAK */ /* If we are setting a new selection, remove current selection first */ if(op==H5S_SELECT_SET) { if(H5S_select_release(space)<0) { @@ -1218,9 +1137,6 @@ herr_t H5S_select_elements (H5S_t *space, H5S_seloper_t op, size_t num_elem, } /* end if */ } /* end if */ -#ifdef QAK - printf("%s: check 2.0\n",FUNC); -#endif /* QAK */ /* Allocate space for the point selection information if necessary */ if(space->select.type!=H5S_SEL_POINTS || space->select.sel_info.pnt_lst==NULL) { if((space->select.sel_info.pnt_lst = H5MM_calloc(sizeof(H5S_pnt_list_t)))==NULL) @@ -1228,9 +1144,6 @@ herr_t H5S_select_elements (H5S_t *space, H5S_seloper_t op, size_t num_elem, "can't allocate element information"); } /* end if */ -#ifdef QAK - printf("%s: check 3.0\n",FUNC); -#endif /* QAK */ /* Add points to selection */ if(H5S_point_add(space,op,num_elem,coord)<0) { HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, @@ -1239,9 +1152,6 @@ herr_t H5S_select_elements (H5S_t *space, H5S_seloper_t op, size_t num_elem, /* Set selection type */ space->select.type=H5S_SEL_POINTS; -#ifdef QAK - printf("%s: check 4.0\n",FUNC); -#endif /* QAK */ done: FUNC_LEAVE (ret_value); diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index bb3e594..18ef378 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -218,7 +218,7 @@ __DLL__ herr_t H5S_select_iterate(void *buf, hid_t type_id, H5S_t *space, H5D_operator_t op, void *operator_data); __DLL__ herr_t H5S_sel_iter_release(const H5S_t *space, H5S_sel_iter_t *sel_iter); -__DLL__ herr_t H5S_select_fill(const void *fill, size_t fill_size, +__DLL__ herr_t H5S_select_fill(void *fill, size_t fill_size, const H5S_t *space, void *buf); /* Needed for internal use of selections in H5Fistore code */ diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 32bf3ff..6b9cd30 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -1565,7 +1565,7 @@ H5S_select_regular(const H5S_t *space) REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S_select_fill(const void *_fill, size_t fill_size, const H5S_t *space, void *buf) +H5S_select_fill(void *_fill, size_t fill_size, const H5S_t *space, void *buf) { void *fill=_fill; /* Alias for fill-value buffer */ herr_t ret_value=FAIL; /* return value */ -- cgit v0.12