⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 batcolor.c

📁 一个内存数据库的源代码这是服务器端还有客户端
💻 C
📖 第 1 页 / 共 2 页
字号:
	BATloopFast(b, p, q, xx) {		ptr h = BUNhead(b,p);		x= (color *) BUNtail(b,p);		if(x== 0 || *x == color_nil)			y = (int)int_nil;		else CLRhueInt(yp,x);		bunfastins(bn, h, yp);	}	finalizeResult(ret,bn,b);	return MAL_SUCCEED;bunins_failed:	BBPreleaseref(b->batCacheid);	BBPreleaseref(bn->batCacheid);	throw(MAL, "batstr.==", "bunins failed");}#line 190 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"#line 151 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"batcolor_export str CLRbatSaturationInt(int *ret, int *l);str CLRbatSaturationInt(int *ret, int *l){   BAT *bn, *b;	BUN p,q;	int xx;	color *x;	int y, *yp = &y;	prepareOperand(b,l,"SaturationInt");	prepareResult(bn,b,getTypeIndex("int",-1,TYPE_int),"SaturationInt");	BATloopFast(b, p, q, xx) {		ptr h = BUNhead(b,p);		x= (color *) BUNtail(b,p);		if(x== 0 || *x == color_nil)			y = (int)int_nil;		else CLRsaturationInt(yp,x);		bunfastins(bn, h, yp);	}	finalizeResult(ret,bn,b);	return MAL_SUCCEED;bunins_failed:	BBPreleaseref(b->batCacheid);	BBPreleaseref(bn->batCacheid);	throw(MAL, "batstr.==", "bunins failed");}#line 191 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"#line 151 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"batcolor_export str CLRbatValueInt(int *ret, int *l);str CLRbatValueInt(int *ret, int *l){   BAT *bn, *b;	BUN p,q;	int xx;	color *x;	int y, *yp = &y;	prepareOperand(b,l,"ValueInt");	prepareResult(bn,b,getTypeIndex("int",-1,TYPE_int),"ValueInt");	BATloopFast(b, p, q, xx) {		ptr h = BUNhead(b,p);		x= (color *) BUNtail(b,p);		if(x== 0 || *x == color_nil)			y = (int)int_nil;		else CLRvalueInt(yp,x);		bunfastins(bn, h, yp);	}	finalizeResult(ret,bn,b);	return MAL_SUCCEED;bunins_failed:	BBPreleaseref(b->batCacheid);	BBPreleaseref(bn->batCacheid);	throw(MAL, "batstr.==", "bunins failed");}#line 192 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"#line 151 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"batcolor_export str CLRbatLuminance(int *ret, int *l);str CLRbatLuminance(int *ret, int *l){   BAT *bn, *b;	BUN p,q;	int xx;	color *x;	int y, *yp = &y;	prepareOperand(b,l,"Luminance");	prepareResult(bn,b,getTypeIndex("int",-1,TYPE_int),"Luminance");	BATloopFast(b, p, q, xx) {		ptr h = BUNhead(b,p);		x= (color *) BUNtail(b,p);		if(x== 0 || *x == color_nil)			y = (int)int_nil;		else CLRluminance(yp,x);		bunfastins(bn, h, yp);	}	finalizeResult(ret,bn,b);	return MAL_SUCCEED;bunins_failed:	BBPreleaseref(b->batCacheid);	BBPreleaseref(bn->batCacheid);	throw(MAL, "batstr.==", "bunins failed");}#line 194 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"#line 151 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"batcolor_export str CLRbatCr(int *ret, int *l);str CLRbatCr(int *ret, int *l){   BAT *bn, *b;	BUN p,q;	int xx;	color *x;	int y, *yp = &y;	prepareOperand(b,l,"Cr");	prepareResult(bn,b,getTypeIndex("int",-1,TYPE_int),"Cr");	BATloopFast(b, p, q, xx) {		ptr h = BUNhead(b,p);		x= (color *) BUNtail(b,p);		if(x== 0 || *x == color_nil)			y = (int)int_nil;		else CLRcr(yp,x);		bunfastins(bn, h, yp);	}	finalizeResult(ret,bn,b);	return MAL_SUCCEED;bunins_failed:	BBPreleaseref(b->batCacheid);	BBPreleaseref(bn->batCacheid);	throw(MAL, "batstr.==", "bunins failed");}#line 195 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"#line 151 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"batcolor_export str CLRbatCb(int *ret, int *l);str CLRbatCb(int *ret, int *l){   BAT *bn, *b;	BUN p,q;	int xx;	color *x;	int y, *yp = &y;	prepareOperand(b,l,"Cb");	prepareResult(bn,b,getTypeIndex("int",-1,TYPE_int),"Cb");	BATloopFast(b, p, q, xx) {		ptr h = BUNhead(b,p);		x= (color *) BUNtail(b,p);		if(x== 0 || *x == color_nil)			y = (int)int_nil;		else CLRcb(yp,x);		bunfastins(bn, h, yp);	}	finalizeResult(ret,bn,b);	return MAL_SUCCEED;bunins_failed:	BBPreleaseref(b->batCacheid);	BBPreleaseref(bn->batCacheid);	throw(MAL, "batstr.==", "bunins failed");}#line 196 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"#line 243 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"#line 202 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"batcolor_export str CLRbatHsv(int *ret, int *l, int *bid2, int *bid3);str CLRbatHsv(int *ret, int *l, int *bid2, int *bid3){   BAT *bn, *b2,*b3, *b;	BUN p,q,p2,p3;	int xx;	flt *x, *x2, *x3;	color y, *yp = &y;	prepareOperand(b,l,"Hsv");	b2= BATdescriptor(*bid2);	if(b2== NULL) 		throw(MAL, "batcolor.Hsv","can not access BAT");	b3= BATdescriptor(*bid3);	if(b3== NULL) 		throw(MAL, "batcolor.Hsv","can not access BAT");	prepareResult(bn,b,getTypeIndex("color",-1,TYPE_int),"Hsv");	p2= BUNfirst(b2);	p3= BUNfirst(b3);	BATloopFast(b, p, q, xx) {		ptr h = BUNhead(b,p);		x= (flt *) BUNtail(b,p);		x2= (flt *) BUNtail(b2,p);		x3= (flt *) BUNtail(b3,p);		if(x== 0 || *x == flt_nil ||		   x2== 0 || *x2 == flt_nil ||		   x3== 0 || *x3 == flt_nil)			y= color_nil;		else CLRhsv(yp,x,x2,x3);		bunfastins(bn, h, yp);		p2+= BUNsize(b2);		p3+= BUNsize(b3);	}	finalizeResult(ret,bn,b);	return MAL_SUCCEED;bunins_failed:	BBPreleaseref(b->batCacheid);	BBPreleaseref(bn->batCacheid);	throw(MAL, "batstr.==", "bunins failed");}#line 243 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"#line 202 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"batcolor_export str CLRbatRgb(int *ret, int *l, int *bid2, int *bid3);str CLRbatRgb(int *ret, int *l, int *bid2, int *bid3){   BAT *bn, *b2,*b3, *b;	BUN p,q,p2,p3;	int xx;	int *x, *x2, *x3;	color y, *yp = &y;	prepareOperand(b,l,"Rgb");	b2= BATdescriptor(*bid2);	if(b2== NULL) 		throw(MAL, "batcolor.Rgb","can not access BAT");	b3= BATdescriptor(*bid3);	if(b3== NULL) 		throw(MAL, "batcolor.Rgb","can not access BAT");	prepareResult(bn,b,getTypeIndex("color",-1,TYPE_int),"Rgb");	p2= BUNfirst(b2);	p3= BUNfirst(b3);	BATloopFast(b, p, q, xx) {		ptr h = BUNhead(b,p);		x= (int *) BUNtail(b,p);		x2= (int *) BUNtail(b2,p);		x3= (int *) BUNtail(b3,p);		if(x== 0 || *x == int_nil ||		   x2== 0 || *x2 == int_nil ||		   x3== 0 || *x3 == int_nil)			y= color_nil;		else CLRrgb(yp,x,x2,x3);		bunfastins(bn, h, yp);		p2+= BUNsize(b2);		p3+= BUNsize(b3);	}	finalizeResult(ret,bn,b);	return MAL_SUCCEED;bunins_failed:	BBPreleaseref(b->batCacheid);	BBPreleaseref(bn->batCacheid);	throw(MAL, "batstr.==", "bunins failed");}#line 244 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"#line 202 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"batcolor_export str CLRbatycc(int *ret, int *l, int *bid2, int *bid3);str CLRbatycc(int *ret, int *l, int *bid2, int *bid3){   BAT *bn, *b2,*b3, *b;	BUN p,q,p2,p3;	int xx;	int *x, *x2, *x3;	color y, *yp = &y;	prepareOperand(b,l,"ycc");	b2= BATdescriptor(*bid2);	if(b2== NULL) 		throw(MAL, "batcolor.ycc","can not access BAT");	b3= BATdescriptor(*bid3);	if(b3== NULL) 		throw(MAL, "batcolor.ycc","can not access BAT");	prepareResult(bn,b,getTypeIndex("color",-1,TYPE_int),"ycc");	p2= BUNfirst(b2);	p3= BUNfirst(b3);	BATloopFast(b, p, q, xx) {		ptr h = BUNhead(b,p);		x= (int *) BUNtail(b,p);		x2= (int *) BUNtail(b2,p);		x3= (int *) BUNtail(b3,p);		if(x== 0 || *x == int_nil ||		   x2== 0 || *x2 == int_nil ||		   x3== 0 || *x3 == int_nil)			y= color_nil;		else CLRycc(yp,x,x2,x3);		bunfastins(bn, h, yp);		p2+= BUNsize(b2);		p3+= BUNsize(b3);	}	finalizeResult(ret,bn,b);	return MAL_SUCCEED;bunins_failed:	BBPreleaseref(b->batCacheid);	BBPreleaseref(bn->batCacheid);	throw(MAL, "batstr.==", "bunins failed");}#line 245 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"#line 247 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batcolor.mx"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -