Exemple #1
0
void (vsip_valldestroy_uc)(
  vsip_vview_uc* v) {	/* vector view  destructor	*/
  if(v != NULL){
     VI_blockdestroy_uc(vsip_vdestroy_uc(v));
  }
  return;
}
vsip_mview_uc* (vsip_mcreate_uc)(
  vsip_length col_length, 
  vsip_length row_length, 
  vsip_major major, 
  vsip_memory_hint mem_hint) {
   vsip_block_uc* b = VI_blockcreate_uc(
             (size_t)(col_length * row_length), mem_hint);
   vsip_mview_uc* v = (vsip_mview_uc*)NULL;
   if(b != NULL){

      v = (major == VSIP_ROW)
      ?
      vsip_mbind_uc(b, (vsip_offset)0,
          (vsip_stride)row_length, col_length,
          (vsip_stride)1, row_length)
      :
      vsip_mbind_uc(b, (vsip_offset)0,
          (vsip_stride)1,col_length,
          (vsip_stride)col_length, row_length);
    
      if(v == (vsip_mview_uc*)NULL) VI_blockdestroy_uc(b);
   }
   return v;
}