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

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

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

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

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

示例1: GO

  void PolyInlineCache::bootstrap(STATE) {    GO(poly_inline_cache).set(state->memory()->new_class<Class, PolyInlineCache>(          state, G(call_site), G(rubinius), "PolyInlineCache"));    GO(inline_cache_entry).set(state->memory()->new_class<Class, InlineCacheEntry>(          state, G(call_site), G(rubinius), "InlineCacheEntry"));  }
开发者ID:Omosofe,项目名称:rubinius,代码行数:7,


示例2: GO

  void CompiledMethod::init(STATE) {    GO(cmethod).set(state->new_class("CompiledMethod", G(executable)));    G(cmethod)->set_object_type(state, CompiledMethodType);    GO(cmethod_vis).set(state->new_class("Visibility", G(object), G(cmethod)));    G(cmethod_vis)->set_object_type(state, MethodVisibilityType);  }
开发者ID:soaexpert,项目名称:rubinius,代码行数:7,


示例3: onig_init

  void Regexp::init(STATE) {    onig_init();    GO(regexp).set(state->new_class("Regexp", G(object), 0));    G(regexp)->set_object_type(state, RegexpType);    GO(matchdata).set(state->new_class("MatchData", G(object), 0));    G(matchdata)->set_object_type(state, MatchDataType);  }
开发者ID:thiagopradi,项目名称:rubinius,代码行数:8,


示例4: GO

  void Selector::init(STATE) {    GO(selectors).set(LookupTable::create(state));    Class* cls = state->new_class("Selector", G(object), G(rubinius));    cls->set_object_type(state, SelectorType);    cls->name(state, state->symbol("Rubinius::Selector"));    GO(selector).set(cls);    cls->set_const(state, state->symbol("ALL"), G(selectors));  }
开发者ID:dbalatero,项目名称:rubinius,代码行数:10,


示例5: add_sym

  void VM::bootstrap_symbol() {#define add_sym(name) GO(sym_ ## name).set(symbol(#name))    add_sym(object_id);    add_sym(method_missing);    add_sym(inherited);    add_sym(from_literal);    add_sym(method_added);    add_sym(send);    add_sym(public);    add_sym(private);    add_sym(protected);    add_sym(undef);    add_sym(const_missing);    add_sym(object_id);    add_sym(call);    add_sym(coerce_into_array);#undef add_sym    GO(sym_s_method_added).set(symbol("singleton_method_added"));    GO(sym_init_copy).set(symbol("initialize_copy"));    GO(sym_plus).set(symbol("+"));    GO(sym_minus).set(symbol("-"));    GO(sym_equal).set(symbol("=="));    GO(sym_nequal).set(symbol("!="));    GO(sym_tequal).set(symbol("==="));    GO(sym_lt).set(symbol("<"));    GO(sym_gt).set(symbol(">"));  }
开发者ID:atoulme,项目名称:rubinius,代码行数:27,


示例6: G

  /* Register the List and List::Node classes as globals */  void List::init(STATE) {    Class* cls;    cls = ontology::new_class_under(state, "List", G(rubinius));    GO(list).set(cls);    cls->set_object_type(state, ListType);    GO(list_node).set(ontology::new_class_under(state,          "Node", cls));    G(list_node)->set_object_type(state, ListNodeType);  }
开发者ID:DanielVartanov,项目名称:rubinius,代码行数:13,


示例7: bootstrap_class

  /* Creates the rubinius object universe from scratch. */  void VM::bootstrap_ontology() {    /*     * Bootstrap everything so we can create fully initialized     * Classes.     */    bootstrap_class();    /*     * Everything is now setup for us to make fully initialized     * classes.     */    /*     * Create our Rubinius module that we hang stuff off     */    initialize_fundamental_constants();    bootstrap_symbol();    initialize_builtin_classes();    bootstrap_exceptions();    /*     * Create any 'stock' objects     */    Object* main = new_object<Object>(G(object));    GO(main).set(main);    G(object)->set_const(this, "MAIN", main); // HACK test hooking up MAIN    Object* undef = new_object<Object>(G(object));    GO(undefined).set(undef);    GO(vm).set(new_class_under("VM", G(rubinius)));    G(vm)->name(state, state->symbol("Rubinius::VM"));    Module* type = new_module("Type", G(rubinius));    type->name(state, state->symbol("Rubinius::Type"));    System::bootstrap_methods(this);    Module::bootstrap_methods(this);    StaticScope::bootstrap_methods(this);    VariableScope::bootstrap_methods(this);    /*     * Setup the table we use to store ivars for immediates     */    GO(external_ivars).set(LookupTable::create(this));    initialize_platform_data();  }
开发者ID:AndreMeira,项目名称:rubinius,代码行数:54,


示例8: G

  /* Register the List and List::Node classes as globals */  void List::init(STATE) {    Class* cls;    cls = state->new_class_under("List", G(rubinius));    GO(list).set(cls);    cls->set_object_type(state, ListType);    G(list)->name(state, state->symbol("Rubinius::List"));    GO(list_node).set(state->new_class("Node", G(object), cls));    G(list_node)->set_object_type(state, ListNodeType);  }
开发者ID:AndrewVos,项目名称:rubinius,代码行数:13,


示例9: fill

static void fill(int x, int y, int c){	int stp;	char m;	stp = 0;	st[stp++] = x;	st[stp++] = y;	m = map[y][x];	assign[y][x] = c;	while (stp >= 2) {		y = st[--stp];		x = st[--stp];#define GO(Y,X) if (map[Y][X] == m && assign[Y][X] == 0) /		      { assign[Y][X] = c; st[stp++] = (X); st[stp++] = (Y); }		if (y > 0) {			if (x > 0) GO(y - 1, x - 1);			GO(y - 1, x);			if ((x + 1) < width) GO(y - 1, x + 1);		}		if (x > 0) GO(y, x - 1);		if ((x + 1) < width) GO(y, x + 1);		if ((y + 1) < height) {			if (x > 0) GO(y + 1, x - 1);			GO(y + 1, x);			if ((x + 1) < width) GO(y + 1, x + 1);		}#undef GO	}}
开发者ID:DavidToca,项目名称:acm,代码行数:35,


示例10: GO

  void CallSite::bootstrap(STATE) {    GO(call_site).set(state->memory()->new_class<Class, CallSite>(          state, G(rubinius), "CallSite"));    max_caches = state->shared().config.machine_call_site_cache_limit.value;    max_evictions = state->shared().config.machine_call_site_eviction_limit.value;  }
开发者ID:rubinius,项目名称:rubinius,代码行数:7,


示例11: GO

  void NativeMethod::init(STATE) {    GO(nmethod).set(ontology::new_class(state, "NativeMethod",          G(executable), G(rubinius)));    G(nmethod)->set_object_type(state, NativeMethodType);    init_thread(state);  }
开发者ID:monkeylibre,项目名称:rubinius,代码行数:7,


示例12: get

			bool get(uint64_t i) const			{				assert ( i < n );				uint64_t const block = i / blocksize;				i -= block*blocksize;				uint64_t const blockptr = getBlockPointer(block);				uint64_t const wordoff = (blockptr / (8*sizeof(uint64_t)));				uint64_t const bitoff = blockptr % (8*sizeof(uint64_t));				::libmaus2::util::GetObject<uint64_t const *> GO(data.begin() + wordoff);				::libmaus2::gamma::GammaDecoder < ::libmaus2::util::GetObject<uint64_t const *> > GD(GO);				if ( bitoff )					GD.decodeWord(bitoff);				GD.decodeWord(rankaccbits); // 1 bit accumulator				bool sym = GD.decodeWord(1);				uint64_t rl = GD.decode()+1;				while ( i >= rl )				{					i -= rl;					sym = ! sym;					rl = GD.decode()+1;				}				return sym;			}
开发者ID:gt1,项目名称:libmaus2,代码行数:30,


示例13: compare

 static bool compare(CommPtr comm, Read<Real> a, Read<Real> b, Real tol,     Real floor, Int ncomps, Int dim) {   if (comm->reduce_and(are_close(a, b, tol, floor))) return true;   /* if floating point arrays are different, we find the value with the      largest relative difference and print it out for users to determine      whether this is actually a serious regression      (and where in the mesh it is most serious)      or whether tolerances simply need adjusting */   auto ah = HostRead<Real>(a);   auto bh = HostRead<Real>(b);   LO max_i = -1;   Real max_diff = 0.0;   for (LO i = 0; i < ah.size(); ++i) {     auto diff = rel_diff_with_floor(ah[i], bh[i], floor);     if (diff > max_diff) {       max_i = i;       max_diff = diff;     }   }   auto global_start = comm->exscan(GO(ah.size()), OMEGA_H_SUM);   auto global_max_diff = comm->allreduce(max_diff, OMEGA_H_MAX);   I32 rank_cand = ArithTraits<I32>::max();   if (max_diff == global_max_diff) rank_cand = comm->rank();   auto best_rank = comm->allreduce(rank_cand, OMEGA_H_MIN);   if (comm->rank() == best_rank) {     auto global_max_i = global_start + max_i;     auto ent_global = global_max_i / ncomps;     auto comp = global_max_i % ncomps;     std::cout << "max diff at " << singular_names[dim] << " " << ent_global               << ", comp " << comp << ", values " << ah[max_i] << " vs "               << bh[max_i] << '/n';   }   comm->barrier();   return false; }
开发者ID:ibaned,项目名称:omega_h,代码行数:35,


示例14: sys_zone2

static void sys_zone2(void){   uint_t numzones = x0 + 1;   GO(SYS_zone, "(ZONE_LIST_DEFUNCT) 2s 1m");   SY(SYS_zone, x0 + ZONE_LIST_DEFUNCT, x0 + 1, &numzones); SUCC;}
开发者ID:AboorvaDevarajan,项目名称:Valgrind-tool,代码行数:7,


示例15: GCS

bool Graph_Completer::sort_everything(){    Graph_Cyclic_Sorter<Point> GCS(G_);    unsigned int i=1, N = G_->nb_vertices();    while (i<N && GCS.neighbors_cyclic_sort(i))    {        i++;    }    G_->extract_abstract_graph(*output_abstract_graph_);    G_->remove_vertex_by_index(0);    Graph_Orienter<Point> GO(G_);    for (i=0; i<G_->nb_vertices(); i++)    {        if (!GO.are_neighbors_correctly_oriented(i))        {            G_->reverse_neighbors_by_index(i);            output_abstract_graph_->reverse_neighbors_by_index(i+1);        }    }    *output_angle_ = G_->direction_from_center_of_mass(0);    return (i==N);}
开发者ID:seub,项目名称:CirclePackings,代码行数:26,


示例16: GO

  void AtomicReference::init(STATE) {    GO(atomic_ref).set(ontology::new_class(state,          "AtomicReference", G(object), G(rubinius)));    G(atomic_ref)->set_object_type(state, AtomicReferenceType);    G(atomic_ref)->name(state, state->symbol("Rubinius::AtomicReference"));  }
开发者ID:Gimi,项目名称:rubinius,代码行数:7,


示例17: GO

  void BlockEnvironment::init(STATE) {    GO(blokenv).set(ontology::new_class(state, "BlockEnvironment", G(object),                                     G(rubinius)));    G(blokenv)->set_object_type(state, BlockEnvironmentType);  }
开发者ID:Locke23rus,项目名称:rubinius,代码行数:7,


示例18: GO

void Numeric::init(STATE) {    GO(numeric).set(ontology::new_class(state, "Numeric"));    // We inherit from this type in for example Rational    // and that class shouldn't have NumericType set since    // that can cause problems.    G(numeric)->set_object_type(state, ObjectType);}
开发者ID:cypher,项目名称:rubinius,代码行数:7,


示例19: G

 void BlockWrapper::init(STATE) {   Class* cls = state->new_class("Proc", G(object));   GO(block_wrapper).set(       state->new_class("FromBlock", cls, cls));   G(block_wrapper)->set_object_type(state, BlockEnvironmentType);   G(block_wrapper)->name(state, state->symbol("Proc::FromBlock")); }
开发者ID:soaexpert,项目名称:rubinius,代码行数:7,


示例20: main

int main(void){   int res;      GO(__NR_fork, 2, "0e");   SY(__NR_fork);   return(0);}
开发者ID:520SRig,项目名称:valgrind,代码行数:9,


示例21: G

  void JIT::bootstrap(STATE) {    Module* jit = state->memory()->new_module<JIT>(state, G(rubinius), "JIT");    GO(jit).set(jit);    Class* cls = state->memory()->new_class<Class>(state, G(jit), "CompileRequest");    G(jit)->compile_class(state, cls);    G(jit)->compile_list(state, List::create(state));  }
开发者ID:clockmaker002,项目名称:rubinius,代码行数:9,


示例22: GO

  void Fiber::init(STATE) {    GO(fiber).set(ontology::new_class(state, "Fiber", G(object), G(rubinius)));    G(fiber)->set_object_type(state, FiberType);#ifdef RBX_FIBER_ENABLED    G(fiber)->set_const(state, "ENABLED", cTrue);#else    G(fiber)->set_const(state, "ENABLED", cFalse);#endif  }
开发者ID:Azzurrio,项目名称:rubinius,代码行数:10,


示例23: GO

  void Fiber::bootstrap(STATE) {    GO(fiber).set(state->memory()->new_class<Class, Fiber>(          state, G(rubinius), "Fiber"));#ifdef RBX_FIBER_ENABLED    G(fiber)->set_const(state, "ENABLED", cTrue);#else    G(fiber)->set_const(state, "ENABLED", cFalse);#endif  }
开发者ID:thedrow,项目名称:rubinius,代码行数:10,


示例24: GO

  void Fiber::init(STATE) {    GO(fiber).set(state->new_class("Fiber", G(object), G(rubinius)));    G(fiber)->set_object_type(state, FiberType);#ifdef FIBER_ENABLED    G(fiber)->set_const(state, "ENABLED", Qtrue);#else    G(fiber)->set_const(state, "ENABLED", Qfalse);#endif  }
开发者ID:MarkusQ,项目名称:rubinius,代码行数:10,


示例25: GO

 void Executable::bootstrap(STATE) {   GO(executable).set(state->memory()->new_class<Class, Executable>(         state, G(rubinius), "Executable"));   G(executable)->set_const(state, "Experimental", Fixnum::from(eExperimental));   G(executable)->set_const(state, "Stack", Fixnum::from(eStack));   G(executable)->set_const(state, "Register", Fixnum::from(eRegister));   G(executable)->set_const(state, "Parsing", Fixnum::from(eParsing));   G(executable)->set_const(state, "Assertion", Fixnum::from(eAssertion));   G(executable)->set_const(state, "Instrumentation", Fixnum::from(eInstrumentation)); }
开发者ID:JesseChavez,项目名称:rubinius,代码行数:10,


示例26: main

int main(void){   /* Uninitialised, but we know px[0] is 0x0. */   long *px = malloc(sizeof(long));   x0 = px[0];   /* SYS_lwp_sigqueue          163 */   GO(SYS_lwp_sigqueue, "5s 1m");   SY(SYS_lwp_sigqueue, x0 - 1, x0, x0 + 1, x0, x0 - 1); FAIL;   return 0;}
开发者ID:AboorvaDevarajan,项目名称:Valgrind-tool,代码行数:12,


示例27: Run

 }inline bool Run(){     int i=n,b=-1,e=0;     while(i--)if(num[f[i]=i]==1)d[que[e++]=i]=1;     while(d[que[++b]]&&b!=e)for(EDGE*p=COT2::map[que[b]];p;p=p->next)if(num[p->y]!=1&&--num[f[que[b]]=p->y]==1){         que[e++]=p->y;         if(d[que[b]]!=200)d[p->y]=d[que[b]]+1;     }if(e==b||e-b>50)return 1;     for(i=m;i--;)ADDQUERY(getint()-1,getint()-1);     while(e--!=b)CT::stt=CT::tmp,CT::T[que[e]]=CT::I(CT::sT,0,n,COT2::a[que[e]]),GO(que[e],-1);     while(++i!=m)printf("%d/n",sq[i].ans);     return 0; }
开发者ID:jki14,项目名称:e.ICPC.SCL.13,代码行数:12,


示例28: main

/* Everything starts here. :) */int main (){	int c, set = 1;	bool is_immediate_decodable = true;	while ((c = getc(stdin)) > 0)	{		// End of a group.		if (c == '9')		{			fprintf(stdout, output[is_immediate_decodable], set);			NEW_GROUP();			is_immediate_decodable = true;			++set;		}		else if (is_immediate_decodable)		{			switch (c)			{				// End of a code.				case '/n':				case ' ':				case '/t':				{					// Checking if is immediate decodable.					if (PATH_CONTINUES()) {						is_immediate_decodable = false;						continue;					}					// This is a final node for a code.					SET_FINAL();					// A new group takes place.					NEW_CODE();					break;				}				// 0 or 1.				default:				{					c -= '0';					GO(c);					if (IS_FINAL())						is_immediate_decodable = false;				}			}		}	}	return 0;}
开发者ID:RGAM496,项目名称:ProgrammingLab,代码行数:51,



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


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