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

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

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

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

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

示例1: verify_bottom_code

voidverify_bottom_code (gcc_jit_context *ctxt, gcc_jit_result *result){  typedef int (*fn_type) (double a, double b, double c,			  double *r1, double *r2);  CHECK_NON_NULL (result);  fn_type test_quadratic =    (fn_type)gcc_jit_result_get_code (result, "test_quadratic");  CHECK_NON_NULL (test_quadratic);  /* Verify that the code correctly solves quadratic equations.  */  double r1, r2;  /* This one has two solutions: */  CHECK_VALUE (test_quadratic (1, 3, -4, &r1, &r2), 2);  CHECK_VALUE (r1, 1);  CHECK_VALUE (r2, -4);  /* This one has one solution: */  CHECK_VALUE (test_quadratic (4, 4, 1, &r1, &r2), 1);  CHECK_VALUE (r1, -0.5);  /* This one has no real solutions: */  CHECK_VALUE (test_quadratic (4, 1, 1, &r1, &r2), 0);}
开发者ID:AlexMioMio,项目名称:gcc,代码行数:27,


示例2: verify_test_of_builtin_trig

static voidverify_test_of_builtin_trig (gcc_jit_context *ctxt, gcc_jit_result *result){  typedef double (*fn_type) (double);  CHECK_NON_NULL (result);  fn_type test_of_builtin_trig =    (fn_type)gcc_jit_result_get_code (result, "test_of_builtin_trig");  CHECK_NON_NULL (test_of_builtin_trig);  /* Verify that it correctly computes        sin (2 * theta)     (perhaps calling sin and cos). */  CHECK_DOUBLE_VALUE (test_of_builtin_trig (0.0         ),  0.0);  CHECK_DOUBLE_VALUE (test_of_builtin_trig (M_PI_4      ),  1.0);  CHECK_DOUBLE_VALUE (test_of_builtin_trig (M_PI_2      ),  0.0);  CHECK_DOUBLE_VALUE (test_of_builtin_trig (M_PI_4 * 3.0), -1.0);  CHECK_DOUBLE_VALUE (test_of_builtin_trig (M_PI        ),  0.0);  /* PR jit/64020:     The "sincos" pass merges sin/cos calls into the cexpi builtin.     Verify that a dump of the "sincos" pass was provided, and that it     shows a call to the cexpi builtin on a SSA name of "theta".  */  CHECK_NON_NULL (trig_sincos_dump);  CHECK_STRING_CONTAINS (trig_sincos_dump, " = __builtin_cexpi (theta_");  free (trig_sincos_dump);  /* Similarly, verify that the statistics dump was provided, and that     it shows the sincos optimization.  */  CHECK_NON_NULL (trig_statistics_dump);  CHECK_STRING_CONTAINS (    trig_statistics_dump,    "sincos /"sincos statements inserted/" /"test_of_builtin_trig/" 1");  free (trig_statistics_dump);}
开发者ID:0day-ci,项目名称:gcc,代码行数:35,


示例3: verify_code

extern voidverify_code (gcc_jit_context *ctxt, gcc_jit_result *result){  typedef void (*fn_type) (const char *);  CHECK_NON_NULL (result);  fn_type hello_world =    (fn_type)gcc_jit_result_get_code (result, "hello_world");  CHECK_NON_NULL (hello_world);  hello_world ("world");  fflush (stdout);}
开发者ID:0day-ci,项目名称:gcc,代码行数:11,


示例4: verify_code

voidverify_code (gcc_jit_context *ctxt, gcc_jit_result *result){  CHECK_NON_NULL (result);  typedef int (*my_fn_type) (void);  CHECK_NON_NULL (result);  my_fn_type my_fn =    (my_fn_type)gcc_jit_result_get_code (result, long_names.fn_name);  CHECK_NON_NULL (my_fn);  int val = my_fn ();  CHECK_VALUE (val, 42);}
开发者ID:0day-ci,项目名称:gcc,代码行数:13,


示例5: verify_void_return

static voidverify_void_return (gcc_jit_context *ctxt, gcc_jit_result *result){  typedef void (*fn_type) (int *);  CHECK_NON_NULL (result);  fn_type test_of_void_return =    (fn_type)gcc_jit_result_get_code (result, "test_of_void_return");  CHECK_NON_NULL (test_of_void_return);  int i;  test_of_void_return (&i);  CHECK_VALUE (i, 1); /* ensure correct value was written back */}
开发者ID:0day-ci,项目名称:gcc,代码行数:14,


示例6: verify_test_of_builtin_strcmp

static voidverify_test_of_builtin_strcmp (gcc_jit_context *ctxt, gcc_jit_result *result){  typedef int (*fn_type) (const char *, const char *);  CHECK_NON_NULL (result);  fn_type test_of_builtin_strcmp =    (fn_type)gcc_jit_result_get_code (result, "test_of_builtin_strcmp");  CHECK_NON_NULL (test_of_builtin_strcmp);  /* Verify that it correctly called strcmp.  */  CHECK_VALUE (test_of_builtin_strcmp ("foo", "foo"), 0);  CHECK (test_of_builtin_strcmp ("foo", "bar") > 0);  CHECK (test_of_builtin_strcmp ("bar", "foo") < 0);}
开发者ID:0day-ci,项目名称:gcc,代码行数:15,


示例7: Z3_fpa_get_numeral_sign

 Z3_bool Z3_API Z3_fpa_get_numeral_sign(Z3_context c, Z3_ast t, int * sgn) {     Z3_TRY;     LOG_Z3_fpa_get_numeral_sign(c, t, sgn);     RESET_ERROR_CODE();     CHECK_NON_NULL(t, 0);     CHECK_VALID_AST(t, 0);     if (sgn == nullptr) {         SET_ERROR_CODE(Z3_INVALID_ARG);         return 0;     }     ast_manager & m = mk_c(c)->m();     mpf_manager & mpfm = mk_c(c)->fpautil().fm();     family_id fid = mk_c(c)->get_fpa_fid();     fpa_decl_plugin * plugin = (fpa_decl_plugin*)m.get_plugin(fid);     expr * e = to_expr(t);     if (!is_app(e) || is_app_of(e, fid, OP_FPA_NAN) || !is_fp(c, t)) {         SET_ERROR_CODE(Z3_INVALID_ARG);         return 0;     }     scoped_mpf val(mpfm);     bool r = plugin->is_numeral(to_expr(t), val);     if (!r || mpfm.is_nan(val)) {         SET_ERROR_CODE(Z3_INVALID_ARG);         return 0;     }     *sgn = mpfm.sgn(val);     return r;     Z3_CATCH_RETURN(0); }
开发者ID:chadbrewbaker,项目名称:z3,代码行数:29,


示例8: Z3_get_model_func_entry_value

 Z3_ast Z3_API Z3_get_model_func_entry_value(Z3_context c,         Z3_model m,         unsigned i,         unsigned j) {     Z3_TRY;     LOG_Z3_get_model_func_entry_value(c, m, i, j);     RESET_ERROR_CODE();     CHECK_NON_NULL(m, 0);     if (j >= get_model_func_num_entries_core(c, m, i)) {         SET_ERROR_CODE(Z3_IOB);         RETURN_Z3(0);     }     Z3_func_decl d = get_model_func_decl_core(c, m, i);     if (d) {         model * _m = to_model_ref(m);         func_interp * g = _m->get_func_interp(to_func_decl(d));         if (g && j < g->num_entries()) {             func_entry const* e = g->get_entry(j);             expr* a = e->get_result();             mk_c(c)->save_ast_trail(a);             RETURN_Z3(of_ast(a));         }         SET_ERROR_CODE(Z3_IOB);         RETURN_Z3(0);     }     RETURN_Z3(0);     Z3_CATCH_RETURN(0); }
开发者ID:kayceesrk,项目名称:Z3,代码行数:28,


示例9: Z3_fpa_get_numeral_sign_bv

 Z3_ast Z3_API Z3_fpa_get_numeral_sign_bv(Z3_context c, Z3_ast t) {     Z3_TRY;     LOG_Z3_fpa_get_numeral_sign_bv(c, t);     RESET_ERROR_CODE();     CHECK_NON_NULL(t, nullptr);     CHECK_VALID_AST(t, nullptr);     ast_manager & m = mk_c(c)->m();     mpf_manager & mpfm = mk_c(c)->fpautil().fm();     family_id fid = mk_c(c)->get_fpa_fid();     fpa_decl_plugin * plugin = (fpa_decl_plugin*)m.get_plugin(fid);     api::context * ctx = mk_c(c);     expr * e = to_expr(t);     if (!is_app(e) || is_app_of(e, fid, OP_FPA_NAN) || !is_fp(c, t)) {         SET_ERROR_CODE(Z3_INVALID_ARG);         RETURN_Z3(nullptr);     }     scoped_mpf val(mpfm);     bool r = plugin->is_numeral(to_expr(t), val);     if (!r || mpfm.is_nan(val)) {         SET_ERROR_CODE(Z3_INVALID_ARG);         return nullptr;     }     app * a;     if (mpfm.is_pos(val))         a = ctx->bvutil().mk_numeral(0, 1);     else         a = ctx->bvutil().mk_numeral(1, 1);     mk_c(c)->save_ast_trail(a);     RETURN_Z3(of_expr(a));     Z3_CATCH_RETURN(nullptr); }
开发者ID:chadbrewbaker,项目名称:z3,代码行数:31,


示例10: Z3_fpa_get_numeral_significand_bv

 Z3_ast Z3_API Z3_fpa_get_numeral_significand_bv(Z3_context c, Z3_ast t) {     Z3_TRY;     LOG_Z3_fpa_get_numeral_significand_bv(c, t);     RESET_ERROR_CODE();     CHECK_NON_NULL(t, nullptr);     CHECK_VALID_AST(t, nullptr);     ast_manager & m = mk_c(c)->m();     mpf_manager & mpfm = mk_c(c)->fpautil().fm();     unsynch_mpq_manager & mpqm = mpfm.mpq_manager();     family_id fid = mk_c(c)->get_fpa_fid();     fpa_decl_plugin * plugin = (fpa_decl_plugin*)m.get_plugin(fid);     SASSERT(plugin != 0);     expr * e = to_expr(t);     if (!is_app(e) || is_app_of(e, fid, OP_FPA_NAN) || !is_fp(c, t)) {         SET_ERROR_CODE(Z3_INVALID_ARG);         RETURN_Z3(nullptr);     }     scoped_mpf val(mpfm);     bool r = plugin->is_numeral(e, val);     if (!r || !(mpfm.is_normal(val) || mpfm.is_denormal(val) || mpfm.is_zero(val) || mpfm.is_inf(val))) {         SET_ERROR_CODE(Z3_INVALID_ARG);         RETURN_Z3(nullptr);     }     unsigned sbits = val.get().get_sbits();     scoped_mpq q(mpqm);     mpqm.set(q, mpfm.sig(val));     if (mpfm.is_inf(val)) mpqm.set(q, 0);     app * a = mk_c(c)->bvutil().mk_numeral(q.get(), sbits-1);     mk_c(c)->save_ast_trail(a);     RETURN_Z3(of_expr(a));     Z3_CATCH_RETURN(nullptr); }
开发者ID:chadbrewbaker,项目名称:z3,代码行数:32,


示例11: Z3_model_has_interp

 bool Z3_API Z3_model_has_interp(Z3_context c, Z3_model m, Z3_func_decl a) {     Z3_TRY;     LOG_Z3_model_has_interp(c, m, a);     CHECK_NON_NULL(m, 0);     return to_model_ref(m)->has_interpretation(to_func_decl(a));     Z3_CATCH_RETURN(false); }
开发者ID:NikolajBjorner,项目名称:z3,代码行数:7,


示例12: Z3_fpa_get_numeral_significand_string

 Z3_string Z3_API Z3_fpa_get_numeral_significand_string(Z3_context c, Z3_ast t) {     Z3_TRY;     LOG_Z3_fpa_get_numeral_significand_string(c, t);     RESET_ERROR_CODE();     CHECK_NON_NULL(t, nullptr);     CHECK_VALID_AST(t, nullptr);     ast_manager & m = mk_c(c)->m();     mpf_manager & mpfm = mk_c(c)->fpautil().fm();     unsynch_mpq_manager & mpqm = mpfm.mpq_manager();     family_id fid = mk_c(c)->get_fpa_fid();     fpa_decl_plugin * plugin = (fpa_decl_plugin*)m.get_plugin(fid);     SASSERT(plugin != 0);     expr * e = to_expr(t);     if (!is_app(e) || is_app_of(e, fid, OP_FPA_NAN) || !is_fp(c, t)) {         SET_ERROR_CODE(Z3_INVALID_ARG);         return "";     }     scoped_mpf val(mpfm);     bool r = plugin->is_numeral(e, val);     if (!r || !(mpfm.is_normal(val) || mpfm.is_denormal(val) || mpfm.is_zero(val) || mpfm.is_inf(val))) {         SET_ERROR_CODE(Z3_INVALID_ARG);         return "";     }     unsigned sbits = val.get().get_sbits();     scoped_mpq q(mpqm);     mpqm.set(q, mpfm.sig(val));     if (!mpfm.is_denormal(val)) mpqm.add(q, mpfm.m_powers2(sbits - 1), q);     mpqm.div(q, mpfm.m_powers2(sbits - 1), q);     if (mpfm.is_inf(val)) mpqm.set(q, 0);     std::stringstream ss;     mpqm.display_decimal(ss, q, sbits);     return mk_c(c)->mk_external_string(ss.str());     Z3_CATCH_RETURN(""); }
开发者ID:chadbrewbaker,项目名称:z3,代码行数:34,


示例13: verify_code

voidverify_code (gcc_jit_context *ctxt, gcc_jit_result *result){  typedef double (*test_nested_loops_fn_type) (int n, double *a, double *b);  CHECK_NON_NULL (result);  test_nested_loops_fn_type test_nested_loops =    (test_nested_loops_fn_type)gcc_jit_result_get_code (result,						     "test_nested_loops");  CHECK_NON_NULL (test_nested_loops);  double test_a[] = {1., 2., 3., 4., 5., 6., 7., 8., 9., 10.};  double test_b[] = {5., 6., 7., 8., 9., 10., 1., 2., 3., 4.};  double val = test_nested_loops (10, test_a, test_b);  note ("test_nested_loops returned: %f", val);  CHECK_VALUE (val, 3025.0);}
开发者ID:0day-ci,项目名称:gcc,代码行数:16,


示例14: verify_code

voidverify_code (gcc_jit_context *ctxt, gcc_jit_result *result){  CHECK_NON_NULL (result);  /* We don't actually build any functions above;     nothing more to verify.  */}
开发者ID:0day-ci,项目名称:gcc,代码行数:7,


示例15: Z3_model_get_num_funcs

 unsigned Z3_API Z3_model_get_num_funcs(Z3_context c, Z3_model m) {     Z3_TRY;     LOG_Z3_model_get_num_funcs(c, m);     RESET_ERROR_CODE();     CHECK_NON_NULL(m, 0);     return to_model_ref(m)->get_num_functions();     Z3_CATCH_RETURN(0); }
开发者ID:NikolajBjorner,项目名称:z3,代码行数:8,


示例16: Z3_func_interp_get_arity

 unsigned Z3_API Z3_func_interp_get_arity(Z3_context c, Z3_func_interp f) {     Z3_TRY;     LOG_Z3_func_interp_get_arity(c, f);     RESET_ERROR_CODE();     CHECK_NON_NULL(f, 0);     return to_func_interp_ref(f)->get_arity();     Z3_CATCH_RETURN(0); }
开发者ID:NikolajBjorner,项目名称:z3,代码行数:8,


示例17: Z3_func_interp_get_else

 Z3_ast Z3_API Z3_func_interp_get_else(Z3_context c, Z3_func_interp f) {     Z3_TRY;     LOG_Z3_func_interp_get_else(c, f);     RESET_ERROR_CODE();     CHECK_NON_NULL(f, 0);     expr * e = to_func_interp_ref(f)->get_else();     RETURN_Z3(of_expr(e));     Z3_CATCH_RETURN(0); }
开发者ID:kayceesrk,项目名称:Z3,代码行数:9,


示例18: verify_code

voidverify_code (gcc_jit_context *ctxt, gcc_jit_result *result){  typedef float (*fn_type) (int i);  CHECK_NON_NULL (result);  fn_type test_union =    (fn_type)gcc_jit_result_get_code (result, "test_union");  CHECK_NON_NULL (test_union);  /* Call the JIT-generated function.  */  float f_result = test_union (42);  union int_or_float u;  u.as_float = f_result;  CHECK_VALUE (u.as_int, 42);}
开发者ID:0day-ci,项目名称:gcc,代码行数:18,


示例19: get_model_func_decl_core

 Z3_func_decl get_model_func_decl_core(Z3_context c, Z3_model m, unsigned i) {     CHECK_NON_NULL(m, nullptr);     model * _m = to_model_ref(m);     if (i >= _m->get_num_functions()) {         SET_ERROR_CODE(Z3_IOB, nullptr);         return nullptr;     }     return of_func_decl(_m->get_function(i)); }
开发者ID:NikolajBjorner,项目名称:z3,代码行数:9,


示例20: Z3_model_has_interp

 Z3_bool Z3_API Z3_model_has_interp(Z3_context c, Z3_model m, Z3_func_decl a) {     Z3_TRY;     LOG_Z3_model_has_interp(c, m, a);     CHECK_NON_NULL(m, 0);     if (to_model_ref(m)->has_interpretation(to_func_decl(a))) {         return Z3_TRUE;     } else {         return Z3_FALSE;     }     Z3_CATCH_RETURN(Z3_FALSE); }
开发者ID:chadbrewbaker,项目名称:z3,代码行数:11,


示例21: verify_uint_overflow_fn

voidverify_uint_overflow_fn (gcc_jit_result *jit_result,			 const char *funcname,			 unsigned int x, unsigned int y,			 unsigned int expected_result,			 int expected_ovf){  CHECK_NON_NULL (jit_result);  typedef unsigned int (*overflow_fn_type) (unsigned int, unsigned int, int *);  overflow_fn_type fn =    (overflow_fn_type)gcc_jit_result_get_code (jit_result, funcname);  CHECK_NON_NULL (fn);  /* Call the function:  */  int actual_ovf = 0;  unsigned int actual_result = fn (x, y, &actual_ovf);  note ("%s (%d, %d) returned: %d with ovf: %d",	funcname, x, y, actual_result, actual_ovf);  CHECK_VALUE (actual_result, expected_result);  CHECK_VALUE (actual_ovf, expected_ovf);}
开发者ID:marxin,项目名称:gcc,代码行数:21,


示例22: verify_hidden_functions

static voidverify_hidden_functions (gcc_jit_context *ctxt, gcc_jit_result *result){  CHECK_NON_NULL (result);  /* GCC_JIT_FUNCTION_INTERNAL and GCC_JIT_FUNCTION_ALWAYS_INLINE     functions should not be accessible in the result.  */  CHECK_VALUE (NULL, gcc_jit_result_get_code (result, "my_internal_mult"));  CHECK_VALUE (NULL, gcc_jit_result_get_code (result, "my_always_inline_mult"));  typedef double (*fn_type) (double);  fn_type my_square_with_internal =    (fn_type)gcc_jit_result_get_code (result, "my_square_with_internal");  CHECK_NON_NULL (my_square_with_internal);  CHECK_VALUE (my_square_with_internal (5.0), 25.0);  fn_type my_square_with_always_inline =    (fn_type)gcc_jit_result_get_code (result, "my_square_with_always_inline");  CHECK_NON_NULL (my_square_with_always_inline);  CHECK_VALUE (my_square_with_always_inline (5.0), 25.0);}
开发者ID:0day-ci,项目名称:gcc,代码行数:21,


示例23: Z3_func_interp_get_else

 Z3_ast Z3_API Z3_func_interp_get_else(Z3_context c, Z3_func_interp f) {     Z3_TRY;     LOG_Z3_func_interp_get_else(c, f);     RESET_ERROR_CODE();     CHECK_NON_NULL(f, nullptr);     expr * e = to_func_interp_ref(f)->get_else();     if (e) {         mk_c(c)->save_ast_trail(e);     }     RETURN_Z3(of_expr(e));     Z3_CATCH_RETURN(nullptr); }
开发者ID:NikolajBjorner,项目名称:z3,代码行数:12,


示例24: verify_code

voidverify_code (gcc_jit_context *ctxt, gcc_jit_result *result){  typedef void (*fn_type) (int);  CHECK_NON_NULL (result);  fn_type test_caller =    (fn_type)gcc_jit_result_get_code (result, "test_caller");  CHECK_NON_NULL (test_caller);  called_with[0] = 0;  called_with[1] = 0;  called_with[2] = 0;  /* Call the JIT-generated function.  */  test_caller (5);  /* Verify that it correctly called "called_function".  */  CHECK_VALUE (called_with[0], 15);  CHECK_VALUE (called_with[1], 20);  CHECK_VALUE (called_with[2], 25);}
开发者ID:0day-ci,项目名称:gcc,代码行数:22,


示例25: Z3_fpa_get_sbits

 unsigned Z3_API Z3_fpa_get_sbits(Z3_context c, Z3_sort s) {     Z3_TRY;     LOG_Z3_fpa_get_sbits(c, s);     RESET_ERROR_CODE();     CHECK_NON_NULL(s, 0);     CHECK_VALID_AST(s, 0);     if (!is_fp_sort(c, s)) {         SET_ERROR_CODE(Z3_INVALID_ARG);         RETURN_Z3(0);     }     return mk_c(c)->fpautil().get_sbits(to_sort(s));     Z3_CATCH_RETURN(0); }
开发者ID:chadbrewbaker,项目名称:z3,代码行数:13,


示例26: Z3_model_get_const_interp

 Z3_ast Z3_API Z3_model_get_const_interp(Z3_context c, Z3_model m, Z3_func_decl a) {     Z3_TRY;     LOG_Z3_model_get_const_interp(c, m, a);     RESET_ERROR_CODE();     CHECK_NON_NULL(m, 0);     expr * r = to_model_ref(m)->get_const_interp(to_func_decl(a));     if (!r) {         SET_ERROR_CODE(Z3_INVALID_ARG);         RETURN_Z3(0);     }     RETURN_Z3(of_expr(r));     Z3_CATCH_RETURN(0); }
开发者ID:kayceesrk,项目名称:Z3,代码行数:13,


示例27: Z3_model_get_const_interp

 Z3_ast_opt Z3_API Z3_model_get_const_interp(Z3_context c, Z3_model m, Z3_func_decl a) {     Z3_TRY;     LOG_Z3_model_get_const_interp(c, m, a);     RESET_ERROR_CODE();     CHECK_NON_NULL(m, nullptr);     expr * r = to_model_ref(m)->get_const_interp(to_func_decl(a));     if (!r) {         RETURN_Z3(nullptr);     }     mk_c(c)->save_ast_trail(r);     RETURN_Z3(of_expr(r));     Z3_CATCH_RETURN(nullptr); }
开发者ID:NikolajBjorner,项目名称:z3,代码行数:13,


示例28: test_script

static voidtest_script (const char *scripts_dir, const char *script_name, int input,	     int expected_result){  char *script_path;  toyvm_function *fn;  int interpreted_result;  toyvm_compiled_function *compiled_fn;  toyvm_compiled_code code;  int compiled_result;  snprintf (test, sizeof (test), "toyvm.c: %s", script_name);  script_path = (char *)malloc (strlen (scripts_dir)				+ strlen (script_name) + 1);  CHECK_NON_NULL (script_path);  sprintf (script_path, "%s%s", scripts_dir, script_name);  fn = toyvm_function_parse (script_path, script_name);  CHECK_NON_NULL (fn);  interpreted_result = toyvm_function_interpret (fn, input, NULL);  CHECK_VALUE (interpreted_result, expected_result);  compiled_fn = toyvm_function_compile (fn);  CHECK_NON_NULL (compiled_fn);  code = (toyvm_compiled_code)compiled_fn->cf_code;  CHECK_NON_NULL (code);  compiled_result = code (input);  CHECK_VALUE (compiled_result, expected_result);  gcc_jit_result_release (compiled_fn->cf_jit_result);  free (compiled_fn);  free (fn);  free (script_path);}
开发者ID:KangDroid,项目名称:gcc,代码行数:38,


示例29: Z3_is_array_value

 Z3_bool Z3_API Z3_is_array_value(Z3_context c, Z3_model _m, Z3_ast _v, unsigned* size) {     Z3_TRY;     LOG_Z3_is_array_value(c, _m, _v, size);     RESET_ERROR_CODE();     CHECK_NON_NULL(_v, Z3_FALSE);     CHECK_NON_NULL(_m, Z3_FALSE);     model * m = to_model_ref(_m);     expr * v = to_expr(_v);     ast_manager& mgr = mk_c(c)->m();     family_id afid = mk_c(c)->get_array_fid();     unsigned sz = 0;     array_util pl(mgr);     if (pl.is_as_array(v)) {         func_decl* f = pl.get_as_array_func_decl(to_app(v));         func_interp* g = m->get_func_interp(f);         sz = g->num_entries();         if (sz > 0 && g->get_arity() != 1) {             return Z3_FALSE;         }     }     else {         while (pl.is_store(v)) {             if (to_app(v)->get_num_args() != 3) {                 return Z3_FALSE;             }             v = to_app(v)->get_arg(0);             ++sz;         }         if (!is_app_of(v, afid, OP_CONST_ARRAY)) {             return Z3_FALSE;         }     }     if (size) {         *size = sz;     }     return Z3_TRUE;     Z3_CATCH_RETURN(Z3_FALSE); }
开发者ID:kayceesrk,项目名称:Z3,代码行数:38,


示例30: Z3_model_eval

 Z3_bool Z3_API Z3_model_eval(Z3_context c, Z3_model m, Z3_ast t, Z3_bool model_completion, Z3_ast * v) {     Z3_TRY;     LOG_Z3_model_eval(c, m, t, model_completion, v);     if (v) *v = 0;     RESET_ERROR_CODE();     CHECK_NON_NULL(m, Z3_FALSE);     model * _m = to_model_ref(m);     expr_ref result(mk_c(c)->m());     _m->eval(to_expr(t), result, model_completion == Z3_TRUE);     mk_c(c)->save_ast_trail(result.get());     *v = of_ast(result.get());     RETURN_Z3_model_eval Z3_TRUE;     Z3_CATCH_RETURN(0); }
开发者ID:kayceesrk,项目名称:Z3,代码行数:14,



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


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