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

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

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

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

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

示例1: GET_NODE

//show entry index sequences -- for debug purposes.void XmlSync::check1(){    QDomElement codeNode_in, codeNode_out;    QDomElement entryNode_in, entryNode_out;    quint32 i, index;    GET_NODE(root_in, "code", codeNode_in);    GET_NODE(root_out, "code", codeNode_out);    GET_FIRST_CHILD_NODE(codeNode_in, entryNode_in);    GET_FIRST_CHILD_NODE(codeNode_out, entryNode_out);    for (i = 0; i < 30; i++)    {        ATTRIBUTE_TO_UINT(entryNode_in, "index", index, quint32);        printf("%d ", index);        entryNode_in = entryNode_in.nextSiblingElement();    }    printf("/n/n");    for (i = 0; i < 30; i++)    {        ATTRIBUTE_TO_UINT(entryNode_out, "index", index, quint32);        printf("%i ", index);        entryNode_out=entryNode_out.nextSiblingElement();    }    printf("/n/n");}
开发者ID:bureg,项目名称:amg-codec-tool,代码行数:30,


示例2: ehgraph_transfer_edge

bool ehgraph_transfer_edge(ehgraph_t* dest, enode_t n1, ehgraph_t* src, enode_t n2, size_t link) {  bool bRet = false;   do {    CheckNotNULL(dest);    CheckNotNULL(src);    CheckLessThan(n1, dest->size);    CheckLessThan(n2, src->size);    CheckEqual(src->nLinks, dest->nLinks);    CheckLessThan(link, src->nLinks);    size_t nL = src->nLinks;        enode_info_t* nDst = &GET_NODE(dest, n1);    enode_info_t* nSrc = &GET_NODE(src, n2);        if (link == 0)       nDst->outDoubleLink = nSrc->outDoubleLink;        if (1 == link)      nDst->inDoubleLink = nSrc->inDoubleLink;        nDst->links[link] = nSrc->links[link];    nDst->superEdge[link] = nSrc->superEdge[link];          for (size_t ld = 0; ld < nL; ++ld) {      nDst->isPredicate[link][ld] = nSrc->isPredicate[link][ld];      nDst->predicateTarget[link][ld] = nSrc->predicateTarget[link][ld];    }    bRet = true;  } while(0);  return bRet;}
开发者ID:mihasighi,项目名称:celia-tools,代码行数:35,


示例3: reset_pnodes

int reset_pnodes(int curr, int pnode){	struct msm_bus_inode_info *info;	struct msm_bus_fabric_device *fabdev;	int index, next_pnode;	fabdev = msm_bus_get_fabric_device(GET_FABID(curr));	if (!fabdev) {		MSM_BUS_ERR("Fabric not found for: %d/n",			(GET_FABID(curr)));			return -ENXIO;	}	index = GET_INDEX(pnode);	info = fabdev->algo->find_node(fabdev, curr);	if (!info) {		MSM_BUS_ERR("Cannot find node info!/n");		return -ENXIO;	}	MSM_BUS_DBG("Starting the loop--remove/n");	do {		struct msm_bus_inode_info *hop;		fabdev = msm_bus_get_fabric_device(GET_FABID(curr));		if (!fabdev) {			MSM_BUS_ERR("Fabric not found/n");				return -ENXIO;		}		next_pnode = info->pnode[index].next;		info->pnode[index].next = -2;		curr = GET_NODE(next_pnode);		index = GET_INDEX(next_pnode);		if (IS_NODE(curr))			hop = fabdev->algo->find_node(fabdev, curr);		else			hop = fabdev->algo->find_gw_node(fabdev, curr);		if (!hop) {			MSM_BUS_ERR("Null Info found for hop/n");			return -ENXIO;		}		MSM_BUS_DBG("%d[%d] = %d/n", info->node_info->priv_id, index,			info->pnode[index].next);		MSM_BUS_DBG("num_pnodes: %d: %d/n", info->node_info->priv_id,			info->num_pnodes);		info = hop;	} while (GET_NODE(info->pnode[index].next) != info->node_info->priv_id);	info->pnode[index].next = -2;	MSM_BUS_DBG("%d[%d] = %d/n", info->node_info->priv_id, index,		info->pnode[index].next);	MSM_BUS_DBG("num_pnodes: %d: %d/n", info->node_info->priv_id,		info->num_pnodes);	return 0;}
开发者ID:Fuzion24,项目名称:SM-G900V_NA_KK_Opensource-S5-Kernel-,代码行数:55,


示例4: ehgraph_set_pred

bool ehgraph_set_pred(ehgraph_t* graph, enode_t node, size_t edge, size_t link, size_t target) {  if (NULL == graph) {    DB_ERROR("null argument");    return false;  }  GET_NODE(graph, node).superEdge[edge] = true;  GET_NODE(graph, node).isPredicate[edge][link] = true;  GET_NODE(graph, node).predicateTarget[edge][link] = target;  return true;}
开发者ID:mihasighi,项目名称:celia-tools,代码行数:11,


示例5: GET_NODE

void AnimationTreePlayer::oneshot_node_set_fadeout_time(const StringName& p_node,float p_time) {	GET_NODE( NODE_ONESHOT, OneShotNode );	n->fade_out=p_time;}
开发者ID:RYG81,项目名称:godot,代码行数:7,


示例6: while

void XmlSync::processEntryType05(QDomElement &parentNode, QByteArray *data){    QDomElement entryNode = parentNode.firstChildElement();    QTextCodec *codec = QTextCodec::codecForName("Shift-JIS");    while(!entryNode.isNull())    {        if(entryNode.tagName() == QString("text"))        {            QDomElement originalNode;            QString originalText;            GET_NODE(entryNode, "original", originalNode);            GET_NODE_TEXT(originalNode, originalText);            data->append(codec->fromUnicode(originalText));        }        else if (entryNode.tagName() == QString("ctrl"))        {            QString ctrlString;            ATTRIBUTE_TO_STRING_NOT_EMPTY(entryNode, "value", ctrlString);            data->append(ctrlString);        }        else        {            fatalExit("Unknown tag (not 'text' or 'ctrl')");        }        entryNode = entryNode.nextSiblingElement();    }}
开发者ID:bureg,项目名称:amg-codec-tool,代码行数:32,


示例7: _m_unserialize

/** * build mtree from serialized mtree data * * @params[in] pointer to serialized data * @returns handle to new mtree * */H _m_unserialize(void *s) {    M *m = malloc(sizeof(M));    m->magic = ((M *)s)->magic;    m->levels = ((M *)s)->levels;    m->lP = malloc(sizeof(L)*m->levels);    H h = {m,{0,0}};    void *blob = ((S *)s)->blob_offset + (void *)s;    uint32_t s_size = SERIALIZED_HEADER_SIZE(m->levels);    for(h.a.l=0; h.a.l<m->levels; h.a.l++) {    L *sl = (L *) (((void *)s) + s_size + ((S *)s)->level_offsets[h.a.l]);    L *l = GET_LEVEL(h);    l->nodes = sl->nodes;    l->nP = malloc(sizeof(N)*l->nodes);    N *sn = sizeof(Mindex)+(void *)sl;    for(h.a.i=0;h.a.i < l->nodes;h.a.i++) {        N *n = GET_NODE(h,l);        *n = *sn;        void *surface = blob+*(size_t *)&sn->surface;        if (n->flags & TFLAG_ALLOCATED) {        n->surface = malloc(sn->size);        memcpy(n->surface,surface,sn->size);        }        else {        *((int *)&n->surface) = *((int *)&sn->surface);        }        sn = (N *) (SERIALIZED_NODE_SIZE + ((void*)sn));    }    }    h.a.i = h.a.l = 0;    return h;}
开发者ID:sourceops,项目名称:ceptr,代码行数:39,


示例8: permute_graph

ehgraph_t* permute_graph(ehgraph_t* graph, int* perm) {  ehgraph_t* ret = NULL, *b = NULL;  do {    CheckNotNULL(graph);    CheckNotNULL(perm);    if (0 != perm[0]) {      DB_ERROR("the null element should remain unchanged in the permutation");      break;    }        b = ehgraph_alloc(NULL, graph->size, graph->ptrdim, graph->nLinks);    if (!b) {      DB_ERROR("allocation failed");      break;    }    b->closed = graph->closed;    for (enode_t i = 0; i < graph->ptrdim; ++i)       VAR2NODE(b, i) = perm[ VAR2NODE(graph, i) ];    for (enode_t i = 0; i < graph->size; ++i) {      GET_NODE(b, perm[i]).inDoubleLink = GET_NODE(graph, i).inDoubleLink;      GET_NODE(b, perm[i]).outDoubleLink = GET_NODE(graph, i).outDoubleLink;      for (size_t l = 0; l < graph->nLinks; ++l) {	GET_LINK(b, perm[i], l) = perm[ GET_LINK(graph, i, l) ];	GET_NODE(b, perm[i]).superEdge[l] = GET_NODE(graph, i).superEdge[l];	for (size_t lp = 0; lp < graph->nLinks; ++lp) {	  GET_NODE(b, perm[i]).isPredicate[l][lp] = GET_NODE(graph, i).isPredicate[l][lp];	  GET_NODE(b, perm[i]).predicateTarget[l][lp] = perm[ GET_NODE(graph, i).predicateTarget[l][lp] ];	}      }    }	       ret = b;  } while(0);    if (!ret)    SafeFree(b);    return ret;}
开发者ID:mihasighi,项目名称:celia-tools,代码行数:46,


示例9: add_path_node

/** * add_path_node: Adds the path information to the current node * @info: Internal node info structure * @next: Combination of the id and index of the next node * Function returns: Number of pnodes (path_nodes) on success, * error on failure. * * Every node maintains the list of path nodes. A path node is * reached by finding the node-id and index stored at the current * node. This makes updating the paths with requested bw and clock * values efficient, as it avoids lookup for each update-path request. */static int add_path_node(struct msm_bus_inode_info *info, int next){	struct path_node *pnode;	int i;	if (ZERO_OR_NULL_PTR(info)) {		MSM_BUS_ERR("Cannot find node info!: id :%d/n",				info->node_info->priv_id);		return -ENXIO;	}	for (i = 0; i <= info->num_pnodes; i++) {		if (info->pnode[i].next == -2) {			MSM_BUS_DBG("Reusing pnode for info: %d at index: %d/n",				info->node_info->priv_id, i);			info->pnode[i].clk[DUAL_CTX] = 0;			info->pnode[i].clk[ACTIVE_CTX] = 0;			info->pnode[i].bw[DUAL_CTX] = 0;			info->pnode[i].bw[ACTIVE_CTX] = 0;			info->pnode[i].next = next;			MSM_BUS_DBG("%d[%d] : (%d, %d)/n",				info->node_info->priv_id, i, GET_NODE(next),				GET_INDEX(next));			return i;		}	}	info->num_pnodes++;	pnode = krealloc(info->pnode,		((info->num_pnodes + 1) * sizeof(struct path_node))		, GFP_KERNEL);	if (ZERO_OR_NULL_PTR(pnode)) {		MSM_BUS_ERR("Error creating path node!/n");		info->num_pnodes--;		return -ENOMEM;	}	info->pnode = pnode;	info->pnode[info->num_pnodes].clk[DUAL_CTX] = 0;	info->pnode[info->num_pnodes].clk[ACTIVE_CTX] = 0;	info->pnode[info->num_pnodes].bw[DUAL_CTX] = 0;	info->pnode[info->num_pnodes].bw[ACTIVE_CTX] = 0;	info->pnode[info->num_pnodes].next = next;	MSM_BUS_DBG("%d[%d] : (%d, %d)/n", info->node_info->priv_id,		info->num_pnodes, GET_NODE(next), GET_INDEX(next));	return info->num_pnodes;}
开发者ID:cooldudezach,项目名称:android_kernel_zte_warplte,代码行数:57,


示例10: find_preds

sl_iter_t *sl_iter_begin (skiplist_t *sl, map_key_t key) {    sl_iter_t *iter = (sl_iter_t *)nbd_malloc(sizeof(sl_iter_t));    if (key != DOES_NOT_EXIST) {        find_preds(NULL, &iter->next, 1, sl, key, DONT_UNLINK);    } else {        iter->next = GET_NODE(sl->head->next[0]);    }    return iter;}
开发者ID:argv0,项目名称:nbds,代码行数:9,


示例11: ehgraph_del_pred

bool ehgraph_del_pred(ehgraph_t* graph, enode_t node, size_t edge, size_t link) {  if (NULL == graph) {    DB_ERROR("null argument");    return false;  }  GET_NODE(graph, node).isPredicate[edge][link] = false;  return true;}
开发者ID:mihasighi,项目名称:celia-tools,代码行数:9,


示例12: sl_min_key

map_key_t sl_min_key (skiplist_t *sl) {    node_t *item = GET_NODE(sl->head->next[0]);    while (item != NULL) {        markable_t next = item->next[0];        if (!HAS_MARK(next))            return item->key;        item = STRIP_MARK(next);    }    return DOES_NOT_EXIST;}
开发者ID:argv0,项目名称:nbds,代码行数:10,


示例13: sl_free

void sl_free (skiplist_t *sl) {    node_t *item = GET_NODE(sl->head->next[0]);    while (item) {        node_t *next = STRIP_MARK(item->next[0]);        if (sl->key_type != NULL) {            nbd_free((void *)item->key);        }        nbd_free(item);        item = next;    }}
开发者ID:argv0,项目名称:nbds,代码行数:11,


示例14: sl_count

size_t sl_count (skiplist_t *sl) {    size_t count = 0;    node_t *item = GET_NODE(sl->head->next[0]);    while (item) {        if (!HAS_MARK(item->next[0])) {            count++;        }        item = STRIP_MARK(item->next[0]);    }    return count;}
开发者ID:argv0,项目名称:nbds,代码行数:11,


示例15: Exec

DesignFlowStep_Status HDLFunctionDeclFix::Exec(){   bool changed_tree = false;   const tree_managerRef TM = AppM->get_tree_manager();   const auto hdl_writer_type = static_cast<HDLWriter_Language>(parameters->getOption<unsigned int>(OPT_writer_language));   const auto hdl_writer = language_writer::create_writer(hdl_writer_type, GetPointer<HLS_manager>(AppM)->get_HLS_target()->get_technology_manager(), parameters);   const auto hdl_reserved_names = hdl_writer->GetHDLReservedNames();   std::remove_const<decltype(hdl_reserved_names)>::type found_names;   if(hdl_writer_type == HDLWriter_Language::VHDL)   {      for(const auto hdl_reserved_name : hdl_reserved_names)      {         found_names.insert(boost::to_upper_copy<std::string>(hdl_reserved_name));      }   }   else   {      found_names = hdl_reserved_names;   }   for(const auto function : TM->GetAllFunctions())   {      auto fd = GetPointer<function_decl>(TM->get_tree_node_const(function));      if(not fd->name)         continue;      auto in = GetPointer<identifier_node>(GET_NODE(fd->name));      const auto identifier = hdl_writer_type == HDLWriter_Language::VHDL ? boost::to_upper_copy<std::string>(in->strg) : in->strg;      if(found_names.find(identifier) != found_names.end())      {         std::map<TreeVocabularyTokenTypes_TokenEnum, std::string> IR_schema;         unsigned int var_decl_name_nid_test;         unsigned var_decl_unique_id=0;         do         {            IR_schema[TOK(TOK_STRG)] = in->strg + STR(var_decl_unique_id++);            var_decl_name_nid_test = TM->find(identifier_node_K, IR_schema);         } while(var_decl_name_nid_test);         found_names.insert(in->strg + STR(var_decl_unique_id - 1));         unsigned int var_decl_name_nid = TM->new_tree_node_id();         TM->create_tree_node(var_decl_name_nid, identifier_node_K, IR_schema);         IR_schema.clear();         tree_nodeRef tr_new_id = TM->GetTreeReindex(var_decl_name_nid);         fd->name = tr_new_id;      }      else      {         found_names.insert(identifier);      }   }   return changed_tree ? DesignFlowStep_Status::SUCCESS : DesignFlowStep_Status::UNCHANGED;}
开发者ID:hoangt,项目名称:PandA-bambu,代码行数:52,


示例16: lwan_trie_add

voidlwan_trie_add(struct lwan_trie *trie, const char *key, void *data){    if (UNLIKELY(!trie || !key || !data))        return;    struct lwan_trie_node **knode, *node;    const char *orig_key = key;    /* Traverse the trie, allocating nodes if necessary */    for (knode = &trie->root; *key; knode = &node->next[(int)(*key++ & 7)])        GET_NODE();    /* Get the leaf node (allocate it if necessary) */    GET_NODE();    struct lwan_trie_leaf *leaf = find_leaf_with_key(node, orig_key, (size_t)(key - orig_key));    bool had_key = leaf;    if (!leaf) {        leaf = malloc(sizeof(*leaf));        if (!leaf)            lwan_status_critical_perror("malloc");    } else if (trie->free_node) {        trie->free_node(leaf->data);    }    leaf->data = data;    if (!had_key) {        leaf->key = strdup(orig_key);        leaf->next = node->leaf;        node->leaf = leaf;    }    return;oom:    lwan_status_critical_perror("calloc");}
开发者ID:HalosGhost,项目名称:lwan,代码行数:37,


示例17: msm_bus_scale_client_reset_pnodes

void msm_bus_scale_client_reset_pnodes(uint32_t cl){	int i, src, pnode, index;	struct msm_bus_client *client = (struct msm_bus_client *)(cl);	if (IS_ERR(client)) {		MSM_BUS_ERR("msm_bus_scale_reset_pnodes error/n");		return;	}	index = 0;	for (i = 0; i < client->pdata->usecase->num_paths; i++) {		src = msm_bus_board_get_iid(			client->pdata->usecase[index].vectors[i].src);		pnode = client->src_pnode[i];		MSM_BUS_DBG("(%d, %d)/n", GET_NODE(pnode), GET_INDEX(pnode));		reset_pnodes(src, pnode);	}}
开发者ID:Brainiarc7,项目名称:android_kernel_huawei_u8185,代码行数:17,


示例18: lru_ass_sub

static intlru_ass_sub(LRU *self, PyObject *key, PyObject *value){    int res = 0;    Node *node = GET_NODE(self->dict, key);    PyErr_Clear();  /* GET_NODE sets an exception on miss. Shut it up. */    if (value) {        if (node) {            Py_INCREF(value);            Py_DECREF(node->value);            node->value = value;            lru_remove_node(self, node);            lru_add_node_at_head(self, node);            res = 0;        } else {            node = PyObject_NEW(Node, &NodeType);            node->key = key;            node->value = value;            node->next = node->prev = NULL;            Py_INCREF(key);            Py_INCREF(value);            res = PUT_NODE(self->dict, key, node);            if (res == 0) {                if (lru_length(self) > self->size) {                    lru_delete_last(self);                }                lru_add_node_at_head(self, node);            }        }    } else {        res = PUT_NODE(self->dict, key, NULL);        if (res == 0) {            assert(node && PyObject_TypeCheck(node, &NodeType));            lru_remove_node(self, node);        }    }    Py_XDECREF(node);    return res;}
开发者ID:pombredanne,项目名称:lru-dict,代码行数:46,



注:本文中的GET_NODE函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ GET_OPCODE函数代码示例
C++ GET_NEXT_PHYSDEV函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。