您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ FUNCTION函数代码示例

51自学网 2021-06-01 20:45:01
  C++
这篇教程C++ FUNCTION函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中FUNCTION函数的典型用法代码示例。如果您正苦于以下问题:C++ FUNCTION函数的具体用法?C++ FUNCTION怎么用?C++ FUNCTION使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了FUNCTION函数的22个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: FUNCTION

voidVideoProducer::Connect(status_t error, const media_source& source,	const media_destination& destination, const media_format& format,	char* _name){	FUNCTION("Connect() %ldx%ld/n",		format.u.raw_video.display.line_width,		format.u.raw_video.display.line_count);	if (fConnected) {		ERROR("Connect() - already connected./n");		return;	}	if (source != fOutput.source) {		ERROR("Connect() - wrong source./n");		return;	}	if (error != B_OK) {		ERROR("Connect() - consumer error: %s/n", strerror(error));		return;	}	if (!const_cast<media_format*>(&format)->Matches(&fOutput.format)) {		ERROR("Connect() - format mismatch./n");		return;	}	fOutput.destination = destination;	strcpy(_name, fOutput.name);	fConnectedFormat = format.u.raw_video;	fBufferDuration = 20000;	if (fConnectedFormat.field_rate != 0.0f) {		fPerformanceTimeBase = fPerformanceTimeBase			+ (bigtime_t)((fFrame - fFrameBase)				* 1000000LL / fConnectedFormat.field_rate);		fFrameBase = fFrame;		fBufferDuration = bigtime_t(1000000LL / fConnectedFormat.field_rate);	}	if (fConnectedFormat.display.bytes_per_row == 0) {		ERROR("Connect() - connected format still has BPR wildcard!/n");		fConnectedFormat.display.bytes_per_row			= 4 * fConnectedFormat.display.line_width;	}	// Create the buffer group	if (fUsedBufferGroup == NULL) {		fBufferGroup = new BBufferGroup(fConnectedFormat.display.bytes_per_row			* fConnectedFormat.display.line_count, BUFFER_COUNT);		status_t err = fBufferGroup->InitCheck();		if (err < B_OK) {			delete fBufferGroup;			fBufferGroup = NULL;			ERROR("Connect() - buffer group error: %s/n", strerror(err));			return;		}		fUsedBufferGroup = fBufferGroup;	}	// get the latency	fBufferLatency = (BUFFER_COUNT - 1) * fBufferDuration;	int32 bufferCount;	if (fUsedBufferGroup->CountBuffers(&bufferCount) == B_OK) {		// recompute the latency		fBufferLatency = (bufferCount - 1) * fBufferDuration;	}	bigtime_t latency = 0;	media_node_id tsID = 0;	FindLatencyFor(fOutput.destination, &latency, &tsID);	SetEventLatency(latency + fBufferLatency);	fConnected = true;	fEnabled = true;	// Tell frame generation thread to recalculate delay value	release_sem(fFrameSync);}
开发者ID:veer77,项目名称:Haiku-services-branch,代码行数:80,


示例2: FUNCTION

doubleFUNCTION(gsl_stats,wabsdev) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t n){  const double wmean = FUNCTION(gsl_stats,wmean)(w, wstride, data, stride, n);  return FUNCTION(gsl_stats,wabsdev_m)(w, wstride, data, stride, n, wmean);}
开发者ID:lemahdi,项目名称:mglib,代码行数:6,


示例3: FUNCTION

	"gpio86", "gpio87", "gpio88", "gpio89", "gpio90"};static const char * const tsif1_groups[] = {	"gpio82", "gpio83", "gpio84", "gpio85", "gpio86"};static const char * const tsif2_groups[] = {	"gpio91", "gpio95", "gpio96", "gpio97", "gpio101"};static const char * const uim_groups[] = {	"gpio130", "gpio131", "gpio132", "gpio133"};static const char * const uim_batt_alarm_groups[] = {	"gpio102"};static const struct msm_function apq8084_functions[] = {	FUNCTION(adsp_ext),	FUNCTION(audio_ref),	FUNCTION(blsp_i2c1),	FUNCTION(blsp_i2c2),	FUNCTION(blsp_i2c3),	FUNCTION(blsp_i2c4),	FUNCTION(blsp_i2c5),	FUNCTION(blsp_i2c6),	FUNCTION(blsp_i2c7),	FUNCTION(blsp_i2c8),	FUNCTION(blsp_i2c9),	FUNCTION(blsp_i2c10),	FUNCTION(blsp_i2c11),	FUNCTION(blsp_i2c12),	FUNCTION(blsp_spi1),	FUNCTION(blsp_spi1_cs1),
开发者ID:3null,项目名称:linux,代码行数:31,


示例4: FUNCTION

voidFUNCTION (test, func) (const size_t M, const size_t N){  TYPE (gsl_vector) * v;  size_t i, j;  size_t k = 0;  TYPE (gsl_matrix) * m = FUNCTION (gsl_matrix, alloc) (M, N);  gsl_test (m->data == 0, NAME (gsl_matrix) "_alloc returns valid pointer");  gsl_test (m->size1 != M, NAME (gsl_matrix) "_alloc returns valid size1");  gsl_test (m->size2 != N, NAME (gsl_matrix) "_alloc returns valid size2");  gsl_test (m->tda != N, NAME (gsl_matrix) "_alloc returns valid tda");  for (i = 0; i < M; i++)    {      for (j = 0; j < N; j++)        {          k++;          FUNCTION (gsl_matrix, set) (m, i, j, (BASE) k);        }    }  {    status = 0;    k = 0;    for (i = 0; i < M; i++)      {        for (j = 0; j < N; j++)          {            k++;            if (m->data[i * N + j] != (BASE) k)              status = 1;          };      };    gsl_test (status, NAME (gsl_matrix) "_set writes into array");  }  {    status = 0;    k = 0;    for (i = 0; i < M; i++)      {        for (j = 0; j < N; j++)          {            k++;            if (FUNCTION (gsl_matrix, get) (m, i, j) != (BASE) k)              status = 1;          };      };    gsl_test (status, NAME (gsl_matrix) "_get reads from array");  }  FUNCTION (gsl_matrix, free) (m);      /* free whatever is in m */  m = FUNCTION (gsl_matrix, calloc) (M, N);  v = FUNCTION (gsl_vector, calloc) (N);  {    int status = (FUNCTION(gsl_matrix,isnull)(m) != 1);    TEST (status, "_isnull" DESC " on calloc matrix");        status = (FUNCTION(gsl_matrix,ispos)(m) != 0);    TEST (status, "_ispos" DESC " on calloc matrix");        status = (FUNCTION(gsl_matrix,isneg)(m) != 0);    TEST (status, "_isneg" DESC " on calloc matrix");    status = (FUNCTION(gsl_matrix,isnonneg)(m) != 1);    TEST (status, "_isnonneg" DESC " on calloc matrix");  }  k = 0;  for (i = 0; i < M; i++)    {      for (j = 0; j < N; j++)        {          k++;          FUNCTION (gsl_matrix, set) (m, i, j, (BASE) k);        }    }  {    status = 0;    k = 0;    for (i = 0; i < M; i++)      {        FUNCTION (gsl_matrix, get_row) (v, m, i);        for (j = 0; j < N; j++)          {            k++;            if (v->data[j] != (BASE) k)              status = 1;          }      }//.........这里部分代码省略.........
开发者ID:hironics,项目名称:GSL,代码行数:101,


示例5: FUNCTION

};static const char * const icllp_spi0_groups[] = { "spi0_grp" };static const char * const icllp_spi1_groups[] = { "spi1_grp" };static const char * const icllp_spi2_groups[] = { "spi2_grp" };static const char * const icllp_i2c0_groups[] = { "i2c0_grp" };static const char * const icllp_i2c1_groups[] = { "i2c1_grp" };static const char * const icllp_i2c2_groups[] = { "i2c2_grp" };static const char * const icllp_i2c3_groups[] = { "i2c3_grp" };static const char * const icllp_i2c4_groups[] = { "i2c4_grp" };static const char * const icllp_uart0_groups[] = { "uart0_grp" };static const char * const icllp_uart1_groups[] = { "uart1_grp" };static const char * const icllp_uart2_groups[] = { "uart2_grp" };static const struct intel_function icllp_functions[] = {	FUNCTION("spi0", icllp_spi0_groups),	FUNCTION("spi1", icllp_spi1_groups),	FUNCTION("spi2", icllp_spi2_groups),	FUNCTION("i2c0", icllp_i2c0_groups),	FUNCTION("i2c1", icllp_i2c1_groups),	FUNCTION("i2c2", icllp_i2c2_groups),	FUNCTION("i2c3", icllp_i2c3_groups),	FUNCTION("i2c4", icllp_i2c4_groups),	FUNCTION("uart0", icllp_uart0_groups),	FUNCTION("uart1", icllp_uart1_groups),	FUNCTION("uart2", icllp_uart2_groups),};static const struct intel_pinctrl_soc_data icllp_soc_data = {	.pins = icllp_pins,	.npins = ARRAY_SIZE(icllp_pins),
开发者ID:AlexShiLucky,项目名称:linux,代码行数:31,


示例6: return

{	return (display.flag.update_acceleration);}// *************************************************************************************************// User navigation ( [____] = default menu item after reset )////	LINE1: 	[Time] -> Alarm -> Temperature -> Altitude -> Heart rate -> Speed -> Acceleration////	LINE2: 	[Date] -> Stopwatch -> Battery  -> ACC -> PPT -> SYNC -> Calories/Distance --> RFBSL// *************************************************************************************************// Line1 - Timeconst struct menu menu_L1_Time ={	FUNCTION(sx_time),			// direct function	FUNCTION(mx_time),			// sub menu function	FUNCTION(display_time),		// display function	FUNCTION(update_time),		// new display data	&menu_L1_Alarm,};// Line1 - Alarmconst struct menu menu_L1_Alarm ={	FUNCTION(sx_alarm),			// direct function	FUNCTION(mx_alarm),			// sub menu function	FUNCTION(display_alarm),	// display function	FUNCTION(update_alarm),		// new display data	&menu_L1_Temperature,};// Line1 - Temperature
开发者ID:aschoonen,项目名称:OpenChronos,代码行数:31,


示例7: FUNCTION

status_tDirEntryTree::LookupEntry(const char* name, uint64& _blockIndex){	FUNCTION("name: /"%s/"/n", name);	status_t error = _InitReadOnly();	if (error != B_OK)		RETURN_ERROR(error);	size_t nameLength = strlen(name);	if (nameLength > kCheckSumFSNameLength)		RETURN_ERROR(B_ENTRY_NOT_FOUND);	uint32 depth = _Depth();	DirEntryBlock entryBlock(fRootEntryBlock, fRootEntryBlockSize);ASSERT(entryBlock.Check());	Block block;	for (uint32 level = 0; level <= depth; level++) {		if (entryBlock.EntryCount() == 0)			RETURN_ERROR(level == 0 ? B_ENTRY_NOT_FOUND : B_BAD_DATA);		bool exactMatch;		int32 index = entryBlock.FindInsertionIndex(name, nameLength,			exactMatch);		// If we haven't found an exact match, the index points to the first		// entry that is greater or after the last entry.		if (!exactMatch) {			if (index == 0) {				// The first entry is already greater, so the branch doesn't				// contain the entry we're looking for.				RETURN_ERROR(B_ENTRY_NOT_FOUND);			}			index--;		}		PRINT("  level %" B_PRId32 " -> index: %" B_PRId32 " %sexact/n", level,			index, exactMatch ? "" : " not ");		uint64 blockIndex = entryBlock.BlockIndexAt(index);		if (level == depth) {			// final level -- here we should have an exact match			if (!exactMatch)				RETURN_ERROR(B_ENTRY_NOT_FOUND);			_blockIndex = blockIndex;			return B_OK;		}		// not the final level -- load the block and descend to the next		// level		if (!block.GetReadable(fDirectory->GetVolume(), blockIndex))			RETURN_ERROR(B_ERROR);		entryBlock.SetTo((checksumfs_dir_entry_block*)block.Data(),			B_PAGE_SIZE);ASSERT(entryBlock.Check());	}	// cannot get here, but keep the compiler happy	RETURN_ERROR(B_ENTRY_NOT_FOUND);}
开发者ID:SummerSnail2014,项目名称:haiku,代码行数:67,


示例8: FUNCTION

};static const char * const audio_ref_clk_groups[] = { "gpio69" };static const char * const bt_groups[] = { "gpio35", "gpio43", "gpio44" };static const char * const fm_groups[] = { "gpio41", "gpio42" };static const char * const wlan_groups[] = {	"gpio36", "gpio37", "gpio38", "gpio39", "gpio40"};static const char * const slimbus_groups[] = { "gpio70", "gpio71" };static const struct msm_function msm8x74_functions[] = {	FUNCTION(gpio),	FUNCTION(cci_i2c0),	FUNCTION(cci_i2c1),	FUNCTION(uim1),	FUNCTION(uim2),	FUNCTION(uim_batt_alarm),	FUNCTION(blsp_uim1),	FUNCTION(blsp_uim2),	FUNCTION(blsp_uim3),	FUNCTION(blsp_uim4),	FUNCTION(blsp_uim5),	FUNCTION(blsp_uim6),	FUNCTION(blsp_uim7),	FUNCTION(blsp_uim8),	FUNCTION(blsp_uim9),	FUNCTION(blsp_uim10),
开发者ID:AkyZero,项目名称:wrapfs-latest,代码行数:31,


示例9: FUNCTION

 *  * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * General Public License for more details. *  * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */intFUNCTION (gsl_vector, fread) (FILE * stream, TYPE (gsl_vector) * v){  int status = FUNCTION (gsl_block, raw_fread) (stream,                                                v->data,                                                v->size,                                                v->stride);  return status;}intFUNCTION (gsl_vector, fwrite) (FILE * stream, const TYPE (gsl_vector) * v){  int status = FUNCTION (gsl_block, raw_fwrite) (stream,                                                 v->data,                                                 v->size,                                                 v->stride);  return status;}#if !(defined(USES_LONGDOUBLE) && !defined(HAVE_PRINTF_LONGDOUBLE))
开发者ID:ICML14MoMCompare,项目名称:spectral-learn,代码行数:32,


示例10: FUNCTION

	"gpio20",	"gpio22", "gpio23", "gpio24", "gpio25",	"gpio26", "gpio27", "gpio28", "gpio29",	"gpio30", "gpio31", "gpio32", "gpio33",	"gpio34"};#define FUNCTION(_name, _gr)					/	{							/		.name = #_name,					/		.groups = oxnas_##_gr##_group,			/		.ngroups = ARRAY_SIZE(oxnas_##_gr##_group),	/	}static const struct oxnas_function oxnas_functions[] = {	FUNCTION(gpio, fct0),	FUNCTION(fct3, fct3),};#define OXNAS_PINCTRL_GROUP(_pin, _name, ...)				/	{								/		.name = #_name,						/		.pin = _pin,						/		.bank = _pin / PINS_PER_BANK,				/		.functions = (struct oxnas_desc_function[]){		/			__VA_ARGS__, { } },				/	}#define OXNAS_PINCTRL_FUNCTION(_name, _fct)		/	{						/		.name = #_name,				/
开发者ID:AK101111,项目名称:linux,代码行数:31,


示例11: FUNCTION

static const char * const sptlp_spi1_groups[] = { "spi0_grp" };static const char * const sptlp_uart0_groups[] = { "uart0_grp" };static const char * const sptlp_uart1_groups[] = { "uart1_grp" };static const char * const sptlp_uart2_groups[] = { "uart2_grp" };static const char * const sptlp_i2c0_groups[] = { "i2c0_grp" };static const char * const sptlp_i2c1_groups[] = { "i2c1_grp" };static const char * const sptlp_i2c2_groups[] = { "i2c2_grp" };static const char * const sptlp_i2c3_groups[] = { "i2c3_grp" };static const char * const sptlp_i2c4_groups[] = { "i2c4_grp", "i2c4b_grp" };static const char * const sptlp_i2c5_groups[] = { "i2c5_grp" };static const char * const sptlp_ssp2_groups[] = { "ssp2_grp" };static const char * const sptlp_emmc_groups[] = { "emmc_grp" };static const char * const sptlp_sd_groups[] = { "sd_grp" };static const struct intel_function sptlp_functions[] = {	FUNCTION("spi0", sptlp_spi0_groups),	FUNCTION("spi1", sptlp_spi1_groups),	FUNCTION("uart0", sptlp_uart0_groups),	FUNCTION("uart1", sptlp_uart1_groups),	FUNCTION("uart2", sptlp_uart2_groups),	FUNCTION("i2c0", sptlp_i2c0_groups),	FUNCTION("i2c1", sptlp_i2c1_groups),	FUNCTION("i2c2", sptlp_i2c2_groups),	FUNCTION("i2c3", sptlp_i2c3_groups),	FUNCTION("i2c4", sptlp_i2c4_groups),	FUNCTION("i2c5", sptlp_i2c5_groups),	FUNCTION("ssp2", sptlp_ssp2_groups),	FUNCTION("emmc", sptlp_emmc_groups),	FUNCTION("sd", sptlp_sd_groups),};
开发者ID:AshishNamdev,项目名称:linux,代码行数:30,


示例12: PcdComMF522

char PcdComMF522(uint8_t   Command,		uint8_t *pIn ,		uint8_t   InLenByte,		uint8_t *pOut ,		uint8_t *pOutLenBit){	FUNCTION() ;	char   status = TAG_ERR;	uint8_t   irqEn   = 0x00;	uint8_t   waitFor = 0x00;	uint8_t   lastBits;	uint8_t   n;	uint32_t   i;	uint8_t PcdErr;	//	printf("CMD %02x/n",pIn[0]);	switch (Command)	{	case PCD_AUTHENT:		irqEn   = 0x12;		waitFor = 0x10;		break;	case PCD_TRANSCEIVE:		irqEn   = 0x77;		waitFor = 0x30;		break;	default:		break;	}	WriteRawRC(ComIEnReg,irqEn|0x80);	//	WriteRawRC(ComIEnReg,irqEn);	ClearBitMask(ComIrqReg,0x80);	SetBitMask(FIFOLevelReg,0x80);	WriteRawRC(CommandReg,PCD_IDLE);	for (i=0; i<InLenByte; i++) {		WriteRawRC(FIFODataReg, pIn [i]);	}	WriteRawRC(CommandReg, Command);	if (Command == PCD_TRANSCEIVE) {		SetBitMask(BitFramingReg,0x80);	}	//i = 600;//
C++ FUNCTION_CAST函数代码示例
C++ FUNC函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。