本文整理汇总了C++中AV函数的典型用法代码示例。如果您正苦于以下问题:C++ AV函数的具体用法?C++ AV怎么用?C++ AV使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AV函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: jtspsscell
static B jtspsscell(J jt,A w,I wf,I wcr,A*zc,A*zt){A c,t,y;B b;
I cn,*cv,j,k,m,n,p,*s,tn,*tv,*u,*u0,*v,*v0;P*wp;
wp=PAV(w); s=AS(w); p=3+s[wf];
y=SPA(wp,i); s=AS(y); m=s[0]; n=s[1];
u0=AV(y); u=u0+n;
v0=u0+wf; v=v0+n;
if(!m){*zt=*zc=mtv; R 1;}
GATV(t,INT,2+2*m,1,0); tv=AV(t); tv[0]=tv[1]=0; tn=2;
GATV(c,INT, 2*m,2,0); cv=AV(c); cv[0]=0; cn=0; *(1+AS(c))=2;
for(j=1;j<m;++j){
b=1;
for(k=0;k<wf;++k)
if(u0[k]!=u[k]){
tv[tn++]=j; tv[tn++]=j; cv[1+cn]=tn-cv[cn];
if(p==tn-cv[cn]){++cv[cn]; cv[1+cn]-=2;}
cn+=2;
cv[cn]=tn-2; u0=u; v0=v; b=0;
break;
}
if(b&&*v0!=*v){tv[tn++]=j; v0=v;}
u+=n; v+=n;
}
tv[tn++]=m; tv[tn++]=m; cv[1+cn]=tn-cv[cn];
if(p==tn-cv[cn]){++cv[cn]; cv[1+cn]-=2;}
cn+=2;
AN(t)= *AS(t)=tn; *zt=t; /* cell divisions (row indices in y) */
AN(c)=cn; *AS(c)=cn/2; *zc=c; /* item divisions (indices in t, # of elements) */
R 1;
} /* frame: all sparse; cell: 1 or more sparse, then dense */
开发者ID:PlanetAPL,项目名称:j-language,代码行数:29,代码来源:vgsp.c
示例2: REPF
static REPF(jtrepzsx) {
A q,x,y;
I c,d,j,k=-1,m,p=0,*qv,*xv,*yv;
P*ap;
RZ(a&&w);
ap=PAV(a);
x=SPA(ap,x);
m=AN(x);
if(!AN(SPA(ap,a)))R repzdx(ravel(x),w,wf,wcr);
y=SPA(ap,i);
yv=AV(y);
RZ(x=cvt(INT,vec(FL,2*m,AV(x))));
xv=AV(x);
if(equ(zero,SPA(ap,e))) {
k=c=*(wf+AS(w));
if(!wf&&SPARSE&AT(w)) {
A a,y;
I m,n,q,*v;
P*wp;
wp=PAV(w);
a=SPA(wp,a);
if(AN(a)&&!*AV(a)) {
y=SPA(wp,i);
v=AS(y);
m=v[0];
n=v[1];
v=AV(y);
k=m?v[(m-1)*n]+1:0;
q=0;
DO(m, if(q==*v)++q; else if(q<*v) {
k=q;
break;
}
v+=n;);
}
开发者ID:iocane,项目名称:unbox,代码行数:35,代码来源:vrep.c
示例3: F2
static F2(jtpdtspmv){A ax,b,g,x,wx,y,yi,yj,z;B*bv;I m,n,s[2],*u,*v,*yv;P*ap,*wp,*zp;
RZ(a&&w);
ap=PAV(a); y=SPA(ap,i); yv=AV(y); s[0]=n=*AS(y); s[1]=1;
GATV(yj,INT,n,2,s);
if(DENSE&AT(w)){
GATV(yi,INT,n,2,s); u=AV(yi); AR(yj)=1; v=AV(yj);
DO(n, *u++=*yv++; *v++=*yv++;);
开发者ID:mlochbaum,项目名称:jsource,代码行数:7,代码来源:cpdtsp.c
示例4: AFFDEF
AFFEND
AFFDEF(arc_tell)
{
AARG(fp);
AFBEGIN;
AFTCALL(VINDEX(IO(AV(fp))->io_ops, IO_tell), AV(fp));
AFEND;
}
开发者ID:GrimDerp,项目名称:arcueid,代码行数:9,代码来源:io.c
示例5: jtixin
static B jtixin(J jt,A w,I s,I*i,I*n){A in,*wv;I j,k,m,*u,wd;
if(AT(w)&BOX){wv=AAV(w); wd=(I)w*ARELATIVE(w); RZ(in=vi(WVR(1))); k=AN(in); u=AV(in);}
else{in=w; k=AN(in)-1; u=1+AV(in);}
ASSERT(1>=AR(in),EVRANK);
ASSERT(k&&k<=(n?2:1),EVLENGTH);
j=u[0]; j=0>j?s+j:j; m=1==k?s-j:u[1];
ASSERT(0<=j&&(!n||j<s&&j+m<=s&&0<=m),EVINDEX);
*i=j; if(n)*n=m;
R 1;
} /* process index file arg for index and length */
开发者ID:donguinn,项目名称:core,代码行数:10,代码来源:xf.c
示例6: F1
F1(bool){A b,h;I j,*v;
RZ(w);
if(VERB&AT(w))R ADERIV(CBOOL, basis1,0L, 0L,0L,0L);
RZ(w=vi(w));
v=AV(w);
DO(AN(w), j=*v++; ASSERT(-16<=j&&j<16,EVINDEX));
GA(b,BOOL,64,2,0); *AS(b)=16; *(1+AS(b))=4; MC(AV(b),booltab,64L);
RZ(h=cant2(apv(AR(w),0L,1L),from(w,b)));
R fdef(CBOOL,VERB, bool1,bool2, w,0L,h, 0L, RMAXL,0L,0L);
}
开发者ID:zeotrope,项目名称:j7-src,代码行数:10,代码来源:a.c
示例7: AFFDEF
static AFFDEF(clos_pprint)
{
AARG(sexpr, disp, fp);
AOARG(visithash);
AFBEGIN;
AFTCALL(arc_mkaff(c, __arc_disp_write, CNIL), CLOS_CODE(AV(sexpr)),
AV(disp), AV(fp), AV(visithash));
AFEND;
}
开发者ID:qyqx,项目名称:arcueid,代码行数:10,代码来源:clos.c
示例8: AFFDEF
static AFFDEF(symbol_pprint)
{
AARG(sexpr, disp, fp);
AOARG(visithash);
AFBEGIN;
(void)visithash;
(void)disp;
AFTCALL(arc_mkaff(c, arc_disp, CNIL), arc_sym2name(c, AV(sexpr)), AV(fp));
AFEND;
}
开发者ID:GrimDerp,项目名称:arcueid,代码行数:10,代码来源:symbol.c
示例9: AFFDEF
AFFEND
static AFFDEF(fio_seek)
{
AARG(fio, offset, whence);
AFBEGIN;
if (!(FIX2INT(AV(whence)) == SEEK_SET || FIX2INT(AV(whence)) == SEEK_CUR ||
FIX2INT(AV(whence)) == SEEK_END)) {
arc_err_cstrfmt(c, "invalid seek whence argument");
ARETURN(CNIL);
}
#ifdef HAVE_FSEEKO
{
long long noff;
if (__arc_val2ll(c, AV(offset), &noff)) {
ARETURN(INT2FIX(fseeko(FIODATA(AV(fio))->fp, (off_t)noff, FIX2INT(AV(whence)))));
} else {
arc_err_cstrfmt(c, "invalid seek offset");
}
}
#else
{
long noff;
if (__arc_val2long(c, AV(offset), &noff)) {
ARETURN(INT2FIX(fseek(FIODATA(AV(fio))->fp, noff, FIX2INT(AV(whence)))));
} else {
arc_err_cstrfmt(c, "invalid seek offset");
}
}
#endif
AFEND;
}
开发者ID:qyqx,项目名称:arcueid,代码行数:35,代码来源:fileio.c
示例10: jtsymext
B jtsymext(J jt,B b){A x,y;I j,m,n,s[2],*v,xn,yn;L*u;
if(b){y=jt->symp; j=((MS*)y-1)->j; n=*AS(y); yn=AN(y);}
else { j=12; n=1; yn=0; }
m=msize[1+j]; /* new size in bytes */
m-=sizeof(MS)+SZI*(AH+2); /* less array overhead */
m/=symcol*SZI; /* new # rows */
s[0]=m; s[1]=symcol; xn=m*symcol; /* new pool array shape */
GA(x,INT,xn,2,s); v=AV(x); /* new pool array */
if(b)ICPY(v,AV(y),yn); /* copy old data to new array */
memset(v+yn,C0,SZI*(xn-yn)); /* 0 unused area for safety */
u=n+(L*)v; j=1+n;
DO(m-n-1, u++->next=j++;); /* build free list extension */
开发者ID:HenryHRich,项目名称:unbox,代码行数:12,代码来源:s.c
示例11: AFFDEF
AFFEND
static AFFDEF(xhash_apply)
{
AARG(tbl, key, dflt);
AFBEGIN;
AFCALL(arc_mkaff(c, arc_xhash_lookup, CNIL), AV(tbl), AV(key));
if (BOUND_P(AFCRV))
ARETURN(AFCRV);
ARETURN(AV(dflt));
AFEND;
}
开发者ID:GrimDerp,项目名称:arcueid,代码行数:12,代码来源:hash.c
示例12: pjmedia_format_id_to_PixelFormat
pj_status_t pjmedia_format_id_to_PixelFormat(pjmedia_format_id fmt_id,
enum AVPixelFormat *pixel_format)
{
unsigned i;
for (i=0; i<PJ_ARRAY_SIZE(ffmpeg_fmt_table); ++i) {
const struct ffmpeg_fmt_table_t *t = &ffmpeg_fmt_table[i];
if (t->id==fmt_id && t->pf != AV(PIX_FMT_NONE)) {
*pixel_format = t->pf;
return PJ_SUCCESS;
}
}
*pixel_format = AV(PIX_FMT_NONE);
return PJ_ENOTFOUND;
}
开发者ID:RyanLee27,项目名称:pjproject,代码行数:15,代码来源:ffmpeg_util.c
示例13: pjmedia_format_id_to_CodecID
pj_status_t pjmedia_format_id_to_CodecID(pjmedia_format_id fmt_id,
unsigned *codec_id)
{
unsigned i;
for (i=0; i<PJ_ARRAY_SIZE(ffmpeg_codec_table); ++i) {
const struct ffmpeg_codec_table_t *t = &ffmpeg_codec_table[i];
if (t->id==fmt_id && t->codec_id != AV(PIX_FMT_NONE)) {
*codec_id = t->codec_id;
return PJ_SUCCESS;
}
}
*codec_id = (unsigned)AV(PIX_FMT_NONE);
return PJ_ENOTFOUND;
}
开发者ID:RyanLee27,项目名称:pjproject,代码行数:15,代码来源:ffmpeg_util.c
示例14: DF1
static DF1(case1){A u;V*sv;
PREF1(case1);
sv=VAV(self);
RZ(u=from(df1(w,sv->g),sv->h));
ASSERT(!AR(u),EVRANK);
R df1(w,*AV(u));
}
开发者ID:zeotrope,项目名称:j7-src,代码行数:7,代码来源:cg.c
示例15: F1
static F1(jtvtokens){A t,*y,z;I n,*s;TA*x;
RZ(t=tokens(vs(w))); n=AN(t); y=AAV(t);
jt->tmonad=1;
GA(z,BOX,WTA*(5+n),2,0); s=AS(z); *s++=5+n; *s=WTA;
x=(TA*)AV(z);
x->a=mark; x->t=0; ++x;
DO(n, x->a=t=*y++; x->t=0; ++x; if(t==xnam||jt->dotnames&&t==xdot)jt->tmonad=0;);
开发者ID:EdKeith,项目名称:core,代码行数:7,代码来源:pv.c
示例16: jtmerge1
static A jtmerge1(J jt,A w,A ind){A z;B*b;C*wc,*zc;D*wd,*zd;I c,it,j,k,m,r,*s,t,*u,*wi,*zi;
RZ(w&&ind);
r=MAX(0,AR(w)-1); s=1+AS(w); t=AT(w); k=bp(t); m=IC(w); c=aii(w);
ASSERT(!(t&SPARSE),EVNONCE);
ASSERT(r==AR(ind),EVRANK);
ASSERT(!ICMP(s,AS(ind),r),EVLENGTH);
GA(z,t,c,r,s);
if(!(AT(ind)&B01+INT))RZ(ind=cvt(INT,ind));
it=AT(ind); u=AV(ind); b=(B*)u;
ASSERT(!c||1<m||!(it&B01),EVINDEX);
ASSERT(!c||1!=m||!memchr(b,C1,c),EVINDEX);
zi=AV(z); zc=(C*)zi; zd=(D*)zc;
wi=AV(w); wc=(C*)wi; wd=(D*)wc;
switch(MCASE(it,k)){
case MCASE(B01,sizeof(C)): DO(c, *zc++=wc[*b++?i+c:i];); break;
case MCASE(B01,sizeof(I)): DO(c, *zi++=wi[*b++?i+c:i];); break;
开发者ID:EdKeith,项目名称:core,代码行数:16,代码来源:am.c
示例17: DF2
static DF2(case2){A u;V*sv;
PREF2(case2);
sv=VAV(self);
RZ(u=from(df2(a,w,sv->g),sv->h));
ASSERT(!AR(u),EVRANK);
R df2(a,w,*AV(u));
}
开发者ID:zeotrope,项目名称:j7-src,代码行数:7,代码来源:cg.c
示例18: jsig
static void jsig(void){
tostdout=1; suspend=1;
if(debugb&&!spc()){
dhead(); jputs("ws full (can not debug suspend)"); jputc(CNL);
debugb=0;
}
dhead(); jputs(AV(*(jerr+AAV(qevm)))); jputc(CNL);
}
开发者ID:zeotrope,项目名称:j7-src,代码行数:8,代码来源:d.c
示例19: jtcants
static A jtcants(J jt,A a,A w,A z){A a1,q,y;B*b,*c;I*u,wr,zr;P*wp,*zp;
RZ(a&&w&&z);
RZ(a=grade1(a));
wr=AR(w); wp=PAV(w); a1=SPA(wp,a);
zr=AR(z); zp=PAV(z);
ASSERT(wr==zr,EVNONCE);
RZ(b=bfi(wr,a1,1));
GA(q,B01,wr,1,0); c=BAV(q); u=AV(a); DO(wr, c[i]=b[u[i]];);
开发者ID:EdKeith,项目名称:core,代码行数:8,代码来源:vcant.c
示例20: jtvaspc
static A jtvaspc(J jt,A a,A w,C id,VF ado,I cv,I t,I zt,I af,I acr,I wf,I wcr,I f,I r){A q;I*as,*v,*ws;
as=AS(a);
ws=AS(w);
GA(q,INT,f+r,1,0); v=AV(q);
if(r>acr){ICPY(v,wf+ws,r); RZ(a=irs2(vec(INT,r-acr,acr+v),a,0L,1L,0L,jtreshape));}
if(r>wcr){ICPY(v,af+as,r); RZ(w=irs2(vec(INT,r-wcr,wcr+v),w,0L,1L,0L,jtreshape));}
R vasp(a,w,id,ado,cv,t,zt,af,r,wf,r,f,r);
} /* prefix agreement on cells */
开发者ID:EdKeith,项目名称:core,代码行数:8,代码来源:va2s.c
注:本文中的AV函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论