コード例 #1
0
ファイル: vsip_tmatrixview_f.c プロジェクト: rrjudd/jvsip
vsip_mview_f *vsip_tmatrixview_f(
     const vsip_tview_f *v,
     vsip_tmslice slice,
     vsip_index index)
{
      vsip_mview_f *mview = (vsip_mview_f*)NULL;
      vsip_block_f *block = v->block;
      vsip_offset off = v->offset;
      if(slice == VSIP_TMYX){
          off += index * v->z_stride;
          mview = vsip_mbind_f(block,off,
                         v->y_stride,v->y_length,
                         v->x_stride,v->x_length);
      } else if(slice == VSIP_TMZX){
          off += index * v->y_stride;
          mview = vsip_mbind_f(block,off,
                         v->z_stride,v->z_length,
                         v->x_stride,v->x_length);
      } else if(slice == VSIP_TMZY){
          off += index * v->x_stride;
          mview = vsip_mbind_f(block,off,
                         v->z_stride,v->z_length,
                         v->y_stride,v->y_length);
      }
      return mview;
}
コード例 #2
0
vsip_mview_f* vsip_mrealview_f(
  const vsip_cmview_f* v) {
    return vsip_mbind_f(
              v->block->R,
              v->offset,
              v->col_stride,
              v->col_length,
              v->row_stride,
              v->row_length);
}
コード例 #3
0
vsip_mview_f* (vsip_mtransview_f)(
  const vsip_mview_f* v) {
    return vsip_mbind_f(
                   v->block, 
                   v->offset, 
                   v->row_stride, 
                   v->row_length, 
                   v->col_stride, 
                   v->col_length);
}
コード例 #4
0
vsip_mview_f* (vsip_mcreate_f)(
  vsip_length m, 
  vsip_length n, 
  vsip_major rc, 
  vsip_memory_hint h) {
   vsip_block_f* b = VI_blockcreate_f((vsip_length)(m*n), h);
   vsip_mview_f* v = (vsip_mview_f*)NULL;
   if(b != (vsip_block_f*)NULL){

      v = (rc == VSIP_ROW)
         ?  
         vsip_mbind_f(b, (vsip_offset)0,
           (vsip_stride)n, m, (vsip_stride)1, n)
         :  
         vsip_mbind_f(b, (vsip_offset)0,
           (vsip_stride)1, m, (vsip_stride)m, n);
 
        if(v == (vsip_mview_f*)NULL) VI_blockdestroy_f(b);   
   }
   return v;
}
コード例 #5
0
ファイル: vsip_msubview_f.c プロジェクト: rrjudd/jvsip
vsip_mview_f* (vsip_msubview_f)(
  const vsip_mview_f* v,
  vsip_index i, 
  vsip_index j, 
  vsip_length m, 
  vsip_length n) {
    return vsip_mbind_f(v->block,
                        v->offset + i * v->col_stride + j * v->row_stride,
                        v->col_stride,
                        m,
                        v->row_stride,
                        n);
}