• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ RE函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: do_exec

static void do_exec (const atf_tc_t * tc, const char *helper_name, atf_process_status_t * s)
{
    atf_fs_path_t process_helpers;

    const char *argv[3];

    get_process_helpers_path (tc, true, &process_helpers);

    argv[0] = atf_fs_path_cstring (&process_helpers);
    argv[1] = helper_name;
    argv[2] = NULL;
    printf ("Executing %s %s\n", argv[0], argv[1]);

    RE (atf_process_exec_array (s, &process_helpers, argv, NULL, NULL));
    atf_fs_path_fini (&process_helpers);
}
开发者ID:274914765,项目名称:C,代码行数:16,代码来源:process_test.c


示例2: caut_enc_get_byte_combination

static S caut_enc_get_byte_combination(SEI * ei, TD const * td, TEI * ti, bool * progress, uint8_t * byte) {
    struct iter_combination * const iter = &ti->prototype.c_combination;
    struct caut_combination const * const desc = &td->prototype.c_combination;

    uint64_t word = 0;
    memcpy(&word, ti->type, caut_tag_size(desc->tag));

    if (iter->tag_iter.tag_position < caut_tag_size(desc->tag)) {
        // still accumulating tag
        uint64_t const mask = mask_with_width(desc->field_count);
        if (word > mask) {
            return caut_status_err_invalid_combination;
        } else if (NULL == byte) {
            return caut_status_err_need_byte;
        } else {
            *progress = true;
            *byte = ((uint8_t *)&word)[iter->tag_iter.tag_position];
            iter->tag_iter.tag_position += 1;

            return caut_status_ok_busy;
        }
    } else {
        while (iter->field_position < desc->field_count) {
            uint64_t const field_flag = flag_set_at(iter->field_position);

            if (0 == (field_flag & word)) {
                iter->field_position += 1;
                continue;
            } else {
                struct caut_field const * const field = &desc->fields[iter->field_position];
                void const * base = (void *)(((uintptr_t)ti->type) + field->offset);

                iter->field_position += 1;

                if (field->data) {
                    RE(push_type_enc_iter(ei, field->ref_id, base));
                    return caut_status_ok_pushed;
                } else {
                    continue;
                }
            }
        }

        return caut_status_ok_pop;
    }
}
开发者ID:cauterize-tools,项目名称:caut-c11-stream,代码行数:46,代码来源:cauterize_encode.c


示例3: caut_enc_get_byte_synonym

static S caut_enc_get_byte_synonym(SEI * ei, TD const * td, TEI * ti, bool * progress, uint8_t * byte) {
    (void)byte;

    struct iter_synonym * const iter = &ti->prototype.c_synonym;
    struct caut_synonym const * const desc = &td->prototype.c_synonym;

    *progress = false;

    if (iter->done == false) {
        RE(push_type_enc_iter(ei, desc->ref_id, ti->type));
        iter->done = true;

        return caut_status_ok_pushed;
    } else {
        return caut_status_ok_pop;
    }
}
开发者ID:cauterize-tools,项目名称:caut-c11-stream,代码行数:17,代码来源:cauterize_encode.c


示例4: ATF_TC_BODY

ATF_TC_BODY(rfind_ch, tc)
{
    atf_dynstr_t str;

    RE(atf_dynstr_init_fmt(&str, "Foo1/Bar2/,.Baz"));

    ATF_REQUIRE_EQ(atf_dynstr_rfind_ch(&str, '\0'), atf_dynstr_npos);

    ATF_REQUIRE_EQ(atf_dynstr_rfind_ch(&str, '0'), atf_dynstr_npos);
    ATF_REQUIRE_EQ(atf_dynstr_rfind_ch(&str, 'b'), atf_dynstr_npos);

    ATF_REQUIRE_EQ(atf_dynstr_rfind_ch(&str, 'F'), 0);
    ATF_REQUIRE_EQ(atf_dynstr_rfind_ch(&str, '/'), 9);
    ATF_REQUIRE_EQ(atf_dynstr_rfind_ch(&str, 'a'), 13);
    ATF_REQUIRE_EQ(atf_dynstr_rfind_ch(&str, 'z'), 14);

    atf_dynstr_fini(&str);
}
开发者ID:0mp,项目名称:freebsd,代码行数:18,代码来源:dynstr_test.c


示例5: check_prepend

static
void
check_prepend(atf_error_t (*prepend)(atf_dynstr_t *, const char *, ...))
{
    const size_t maxlen = 8192;
    char buf[maxlen + 1];
    size_t i;
    atf_dynstr_t str;

    printf("Prepending with plain string\n");
    buf[0] = '\0';
    RE(atf_dynstr_init(&str));
    for (i = 0; i < maxlen; i++) {
        if (strcmp(atf_dynstr_cstring(&str), buf) != 0) {
            fprintf(stderr, "Failed at iteration %zd\n", i);
            atf_tc_fail("Failed to prepend character at iteration %zd", i);
        }

        memmove(buf + 1, buf, i + 1);
        if (i % 2 == 0) {
            RE(prepend(&str, "%s", "a"));
            buf[0] = 'a';
        } else {
            RE(prepend(&str, "%s", "b"));
            buf[0] = 'b';
        }
    }
    atf_dynstr_fini(&str);

    printf("Prepending with formatted string\n");
    buf[0] = '\0';
    RE(atf_dynstr_init(&str));
    for (i = 0; i < maxlen; i++) {
        if (strcmp(atf_dynstr_cstring(&str), buf) != 0) {
            fprintf(stderr, "Failed at iteration %zd\n", i);
            atf_tc_fail("Failed to prepend character at iteration %zd", i);
        }

        memmove(buf + 1, buf, i + 1);
        if (i % 2 == 0) {
            RE(prepend(&str, "%s", "a"));
            buf[0] = 'a';
        } else {
            RE(prepend(&str, "%s", "b"));
            buf[0] = 'b';
        }
    }
    atf_dynstr_fini(&str);
}
开发者ID:0mp,项目名称:freebsd,代码行数:49,代码来源:dynstr_test.c


示例6: ATF_TC_BODY

ATF_TC_BODY (status_coredump, tc)
{
    struct rlimit rl;

    rl.rlim_cur = RLIM_INFINITY;
    rl.rlim_max = RLIM_INFINITY;
    if (setrlimit (RLIMIT_CORE, &rl) == -1)
        atf_tc_skip ("Cannot unlimit the core file size; check limits " "manually");

    const int rawstatus = fork_and_wait_child (child_sigquit);

    atf_process_status_t s;

    RE (atf_process_status_init (&s, rawstatus));
    ATF_CHECK (!atf_process_status_exited (&s));
    ATF_CHECK (atf_process_status_signaled (&s));
    ATF_CHECK_EQ (atf_process_status_termsig (&s), SIGQUIT);
    ATF_CHECK (atf_process_status_coredump (&s));
    atf_process_status_fini (&s);
}
开发者ID:274914765,项目名称:C,代码行数:20,代码来源:process_test.c


示例7: redirect_fd_stream_init

static void redirect_fd_stream_init (void *v)
{
    struct redirect_fd_stream *s = v;

    switch (s->m_base.m_type)
    {
        case stdout_type:
            s->m_fd = open ("stdout", O_WRONLY | O_CREAT | O_TRUNC, 0644);
            break;
        case stderr_type:
            s->m_fd = open ("stderr", O_WRONLY | O_CREAT | O_TRUNC, 0644);
            break;
        default:
            UNREACHABLE;
    }
    ATF_REQUIRE (s->m_fd != -1);

    s->m_base.m_sb_ptr = &s->m_base.m_sb;
    RE (atf_process_stream_init_redirect_fd (&s->m_base.m_sb, s->m_fd));
}
开发者ID:274914765,项目名称:C,代码行数:20,代码来源:process_test.c


示例8: ATF_TC_BODY

ATF_TC_BODY(rewrite__too_long_with_newlines, tc)
{
    char input[1000];
    fill_buffer("failed: ", "line\n", input, sizeof(input));

    // This is quite awful but is the price we have to pay for using fixed-size
    // buffers in the code for simplicity and speed...
    char exp_output[1024 + 8 /* strlen("failed: ") */ + 1];
    fill_buffer("failed: ", "line<<NEWLINE>>", exp_output, sizeof(exp_output));
    exp_output[sizeof(exp_output) - 2] = '\n';

    bool success;
    atf_utils_create_file("in.txt", "%s", input);
    RE(kyua_atf_result_rewrite("in.txt", "out.txt",
                               generate_wait_exitstatus(EXIT_FAILURE),
                               false, &success));
    atf_utils_cat_file("out.txt", "OUTPUT:   ");
    printf("EXPECTED: %s", exp_output);
    ATF_REQUIRE(atf_utils_compare_file("out.txt", exp_output));
    ATF_REQUIRE_EQ(false, success);
}
开发者ID:namore,项目名称:kyua,代码行数:21,代码来源:atf_result_test.c


示例9: caut_enc_get_byte_array

static S caut_enc_get_byte_array(SEI * ei, TD const * td, TEI * ti, bool * progress, uint8_t * byte) {
    struct iter_array * const iter = &ti->prototype.c_array;
    struct caut_array const * const desc = &td->prototype.c_array;

    *progress = false;
    (void) byte;

    if (iter->elem_position < desc->length) {
        void const * base =
            (void *)(
                ((uintptr_t)ti->type) +
                (desc->elem_span * iter->elem_position));

        RE(push_type_enc_iter(ei, desc->ref_id, base));
        iter->elem_position += 1;

        return caut_status_ok_pushed;
    } else {
        return caut_status_ok_pop;
    }
}
开发者ID:cauterize-tools,项目名称:caut-c11-stream,代码行数:21,代码来源:cauterize_encode.c


示例10: PA_HeldObjectMove

void PA_HeldObjectMove(Ts *ts, Obj *held, Obj *grid, GridCoord torow,
                       GridCoord tocol)
{
  ObjList	*objs, *p;
  /* (S8) -> (S2)+(S6): Held object which moves is no longer
   * inside anything. (Holding overrides inside.)
   * todo: Actor holds key in pocket while walking.
   */
  TE(ts, L(N("inside"), held, ObjWild, E));

  if (grid) { /* Optimization. */
    /* (S7): <held> is small container. */
    objs = RE(ts, L(N("inside"), ObjWild, held, E));
    for (p = objs; p; p = p->next) {
      PA_SmallContainedObjectMove(ts, I(p->obj, 1), grid, torow, tocol);
    }
    ObjListFree(objs);
  }

  PA_MoveObject(ts, held, grid, torow, tocol);
}
开发者ID:brunogal,项目名称:thoughttreasure,代码行数:21,代码来源:pagrasp.c


示例11: assert

// Populate __pointers section.
void RuntimeDyldMachO::populateIndirectSymbolPointersSection(
                                                    const MachOObjectFile &Obj,
                                                    const SectionRef &PTSection,
                                                    unsigned PTSectionID) {
  assert(!Obj.is64Bit() &&
         "Pointer table section not supported in 64-bit MachO.");

  MachO::dysymtab_command DySymTabCmd = Obj.getDysymtabLoadCommand();
  MachO::section Sec32 = Obj.getSection(PTSection.getRawDataRefImpl());
  uint32_t PTSectionSize = Sec32.size;
  unsigned FirstIndirectSymbol = Sec32.reserved1;
  const unsigned PTEntrySize = 4;
  unsigned NumPTEntries = PTSectionSize / PTEntrySize;
  unsigned PTEntryOffset = 0;

  assert((PTSectionSize % PTEntrySize) == 0 &&
         "Pointers section does not contain a whole number of stubs?");

  DEBUG(dbgs() << "Populating pointer table section "
               << Sections[PTSectionID].getName() << ", Section ID "
               << PTSectionID << ", " << NumPTEntries << " entries, "
               << PTEntrySize << " bytes each:\n");

  for (unsigned i = 0; i < NumPTEntries; ++i) {
    unsigned SymbolIndex =
      Obj.getIndirectSymbolTableEntry(DySymTabCmd, FirstIndirectSymbol + i);
    symbol_iterator SI = Obj.getSymbolByIndex(SymbolIndex);
    ErrorOr<StringRef> IndirectSymbolNameOrErr = SI->getName();
    if (std::error_code EC = IndirectSymbolNameOrErr.getError())
      report_fatal_error(EC.message());
    StringRef IndirectSymbolName = *IndirectSymbolNameOrErr;
    DEBUG(dbgs() << "  " << IndirectSymbolName << ": index " << SymbolIndex
          << ", PT offset: " << PTEntryOffset << "\n");
    RelocationEntry RE(PTSectionID, PTEntryOffset,
                       MachO::GENERIC_RELOC_VANILLA, 0, false, 2);
    addRelocationForSymbol(RE, IndirectSymbolName);
    PTEntryOffset += PTEntrySize;
  }
}
开发者ID:2asoft,项目名称:freebsd,代码行数:40,代码来源:RuntimeDyldMachO.cpp


示例12: passf2pos_sse

static void passf2pos_sse(const uint16_t l1, const complex_t *cc,
                          complex_t *ch, const complex_t *wa)
{
    uint16_t k, ah, ac;

    for (k = 0; k < l1; k++)
    {
        ah = 2*k;
        ac = 4*k;

        RE(ch[ah])    = RE(cc[ac]) + RE(cc[ac+1]);
        IM(ch[ah])    = IM(cc[ac]) + IM(cc[ac+1]);

        RE(ch[ah+l1]) = RE(cc[ac]) - RE(cc[ac+1]);
        IM(ch[ah+l1]) = IM(cc[ac]) - IM(cc[ac+1]);
    }
}
开发者ID:TravisKraatz,项目名称:cinelerra,代码行数:17,代码来源:cfft.c


示例13: caut_enc_get_byte_record

static S caut_enc_get_byte_record(SEI * ei, TD const * td, TEI * ti, bool * progress, uint8_t * byte) {
    struct iter_record * const iter = &ti->prototype.c_record;
    struct caut_record const * const desc = &td->prototype.c_record;

    (void) byte;
    *progress = false;

    if (iter->field_position < desc->field_count) {
        struct caut_field const * const field = &desc->fields[iter->field_position];
        void const * base = (void *)(((uintptr_t)ti->type) + field->offset);

        if (field->data == false) {
            return caut_status_err_invalid_record;
        } else {
            RE(push_type_enc_iter(ei, field->ref_id, base));
            iter->field_position += 1;
        }

        return caut_status_ok_pushed;
    } else {
        return caut_status_ok_pop;
    }
}
开发者ID:cauterize-tools,项目名称:caut-c11-stream,代码行数:23,代码来源:cauterize_encode.c


示例14: caut_enc_get_byte_vector

static S caut_enc_get_byte_vector(SEI * ei, TD const * td, TEI * ti, bool * progress, uint8_t * byte) {
    struct iter_vector * const iter = &ti->prototype.c_vector;
    struct caut_vector const * const desc = &td->prototype.c_vector;

    uint64_t word = 0;
    memcpy(&word, ti->type, caut_tag_size(desc->tag));

    if (iter->tag_iter.tag_position < caut_tag_size(desc->tag)) {
        // still accumulating tag
        if (word > desc->max_length) {
            return caut_status_err_invalid_vector;
        } else if (NULL == byte) {
            return caut_status_err_need_byte;
        } else {
            *progress = true;
            *byte = ((uint8_t *)&word)[iter->tag_iter.tag_position];
            iter->tag_iter.tag_position += 1;

            return caut_status_ok_busy;
        }
    } else if (iter->elem_position < word) {
        // accumulating elements
        void const * base =
            (void *)(
                ((uintptr_t)ti->type) +
                desc->elem_offset +
                (desc->elem_span * iter->elem_position));

        RE(push_type_enc_iter(ei, desc->ref_id, base));
        iter->elem_position += 1;

        return caut_status_ok_pushed;
    } else {
        return caut_status_ok_pop;
    }
}
开发者ID:cauterize-tools,项目名称:caut-c11-stream,代码行数:36,代码来源:cauterize_encode.c


示例15: PA_MoveTo

/* SUBGOAL move-to na ?grasper ?object */
void PA_MoveTo(Context *cx, Subgoal *sg, Ts *ts, Obj *a, Obj *o)
{
  Obj	*p;
  Dur	d;
  Dbg(DBGPLAN, DBGOK, "PA_MoveTo", E);
  switch (sg->state) {
    case STBEGIN:
      if (!(p = DbRetrieveWhole(ts, NULL, N("human"), I(o, 2)))) goto failure;
      if (p != a) {
        Dbg(DBGPLAN, DBGDETAIL, "failure: grasper not part of actor", E);
        goto failure;
      }
      SG(cx, sg, 1, STFAILURE, L(N("near-reachable"), p, I(o,3), E));
      return;
    case 1:
      if ((p = R1E(ts, L(N("inside"), I(o,3), ObjWild, E))) &&
          YES(RE(ts, L(N("closed"), I(p, 2), E)))) {
        SG(cx, sg, 2, STFAILURE, L(N("open"), I(p, 2), E));
      } else {
        TOSTATE(cx, sg, 2);
      }
      return;
    case 2:
      PA_GrasperMove(ts, I(o, 2), NULL, 0, 0);

      d = DurationOf(I(o, 0));
      AA(ts, d, o);
      TsIncrement(ts, d);
      AS(ts, 0, L(N("near-graspable"), I(o,2), I(o,3), E));
      TOSTATE(cx, sg, STSUCCESS);
      return;
    default: Dbg(DBGPLAN, DBGBAD, "PA_MoveTo: undefined state %d", sg->state);
  }
failure:
  TOSTATE(cx, sg, STFAILURE);
}
开发者ID:brunogal,项目名称:thoughttreasure,代码行数:37,代码来源:pagrasp.c


示例16: work_directory_signal_check

/// Performs a signal delivery test to the work directory handling code.
///
/// \param signo The signal to deliver.
static void
work_directory_signal_check(const int signo)
{
    char* tmpdir;
    RE(kyua_fs_make_absolute("worktest", &tmpdir));
    ATF_REQUIRE(mkdir(tmpdir, 0755) != -1);
    RE(kyua_env_set("TMPDIR", tmpdir));

    char* work_directory;
    RE(kyua_run_work_directory_enter("template.XXXXXX", getuid(), getgid(),
                                     &work_directory));

    kyua_run_params_t run_params;
    kyua_run_params_init(&run_params);
    run_params.work_directory = work_directory;

    pid_t pid;
    RE(kyua_run_fork(&run_params, &pid));
    if (pid == 0) {
        sleep(run_params.timeout_seconds * 2);
        abort();
    }

    // This should cause the handled installed by the work_directory management
    // code to terminate the subprocess so that we get a chance to run the
    // cleanup code ourselves.
    kill(getpid(), signo);

    int status; bool timed_out;
    RE(kyua_run_wait(pid, &status, &timed_out));
    ATF_REQUIRE(!timed_out);
    ATF_REQUIRE(WIFSIGNALED(status));
    ATF_REQUIRE_EQ(SIGKILL, WTERMSIG(status));

    ATF_REQUIRE(rmdir(tmpdir) == -1);  // Not yet empty.
    RE(kyua_run_work_directory_leave(&work_directory));
    ATF_REQUIRE(rmdir(tmpdir) != -1);
    free(tmpdir);
}
开发者ID:s5unty,项目名称:kyua,代码行数:42,代码来源:run_test.c


示例17: passf2pos_sse_ido

static void passf2pos_sse_ido(const uint16_t ido, const uint16_t l1, const complex_t *cc,
                              complex_t *ch, const complex_t *wa)
{
    uint16_t i, k, ah, ac;

    for (k = 0; k < l1; k++)
    {
        ah = k*ido;
        ac = 2*k*ido;

        for (i = 0; i < ido; i+=4)
        {
            __m128 m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14;
            __m128 m15, m16, m17, m18, m19, m20, m21, m22, m23, m24;
            __m128 w1, w2, w3, w4;

            m1 = _mm_load_ps(&RE(cc[ac+i]));
            m2 = _mm_load_ps(&RE(cc[ac+ido+i]));
            m5 = _mm_load_ps(&RE(cc[ac+i+2]));
            m6 = _mm_load_ps(&RE(cc[ac+ido+i+2]));
            w1 = _mm_load_ps(&RE(wa[i]));
            w3 = _mm_load_ps(&RE(wa[i+2]));

            m3 = _mm_add_ps(m1, m2);
            m15 = _mm_add_ps(m5, m6);

            m4 = _mm_sub_ps(m1, m2);
            m16 = _mm_sub_ps(m5, m6);

            _mm_store_ps(&RE(ch[ah+i]), m3);
            _mm_store_ps(&RE(ch[ah+i+2]), m15);


            w2 = _mm_shuffle_ps(w1, w1, _MM_SHUFFLE(2, 3, 0, 1));
            w4 = _mm_shuffle_ps(w3, w3, _MM_SHUFFLE(2, 3, 0, 1));

            m7 = _mm_mul_ps(m4, w1);
            m17 = _mm_mul_ps(m16, w3);
            m8 = _mm_mul_ps(m4, w2);
            m18 = _mm_mul_ps(m16, w4);

            m9  = _mm_shuffle_ps(m7, m8, _MM_SHUFFLE(2, 0, 2, 0));
            m19 = _mm_shuffle_ps(m17, m18, _MM_SHUFFLE(2, 0, 2, 0));
            m10 = _mm_shuffle_ps(m7, m8, _MM_SHUFFLE(3, 1, 3, 1));
            m20 = _mm_shuffle_ps(m17, m18, _MM_SHUFFLE(3, 1, 3, 1));

            m11 = _mm_add_ps(m9, m10);
            m21 = _mm_add_ps(m19, m20);
            m12 = _mm_sub_ps(m9, m10);
            m22 = _mm_sub_ps(m19, m20);

            m13 = _mm_shuffle_ps(m11, m11, _MM_SHUFFLE(0, 0, 3, 2));
            m23 = _mm_shuffle_ps(m21, m21, _MM_SHUFFLE(0, 0, 3, 2));

            m14 = _mm_unpacklo_ps(m12, m13);
            m24 = _mm_unpacklo_ps(m22, m23);

            _mm_store_ps(&RE(ch[ah+i+l1*ido]), m14);
            _mm_store_ps(&RE(ch[ah+i+2+l1*ido]), m24);
        }
    }
}
开发者ID:TravisKraatz,项目名称:cinelerra,代码行数:62,代码来源:cfft.c


示例18: passf3

static void passf3(const uint16_t ido, const uint16_t l1, const complex_t *cc,
                   complex_t *ch, const complex_t *wa1, const complex_t *wa2,
                   const int8_t isign)
{
    static real_t taur = FRAC_CONST(-0.5);
    static real_t taui = FRAC_CONST(0.866025403784439);
    uint16_t i, k, ac, ah;
    complex_t c2, c3, d2, d3, t2;

    if (ido == 1)
    {
        if (isign == 1)
        {
            for (k = 0; k < l1; k++)
            {
                ac = 3*k+1;
                ah = k;

                RE(t2) = RE(cc[ac]) + RE(cc[ac+1]);
                IM(t2) = IM(cc[ac]) + IM(cc[ac+1]);
                RE(c2) = RE(cc[ac-1]) + MUL_F(RE(t2),taur);
                IM(c2) = IM(cc[ac-1]) + MUL_F(IM(t2),taur);

                RE(ch[ah]) = RE(cc[ac-1]) + RE(t2);
                IM(ch[ah]) = IM(cc[ac-1]) + IM(t2);

                RE(c3) = MUL_F((RE(cc[ac]) - RE(cc[ac+1])), taui);
                IM(c3) = MUL_F((IM(cc[ac]) - IM(cc[ac+1])), taui);

                RE(ch[ah+l1]) = RE(c2) - IM(c3);
                IM(ch[ah+l1]) = IM(c2) + RE(c3);
                RE(ch[ah+2*l1]) = RE(c2) + IM(c3);
                IM(ch[ah+2*l1]) = IM(c2) - RE(c3);
            }
        } else {
            for (k = 0; k < l1; k++)
            {
                ac = 3*k+1;
                ah = k;

                RE(t2) = RE(cc[ac]) + RE(cc[ac+1]);
                IM(t2) = IM(cc[ac]) + IM(cc[ac+1]);
                RE(c2) = RE(cc[ac-1]) + MUL_F(RE(t2),taur);
                IM(c2) = IM(cc[ac-1]) + MUL_F(IM(t2),taur);

                RE(ch[ah]) = RE(cc[ac-1]) + RE(t2);
                IM(ch[ah]) = IM(cc[ac-1]) + IM(t2);

                RE(c3) = MUL_F((RE(cc[ac]) - RE(cc[ac+1])), taui);
                IM(c3) = MUL_F((IM(cc[ac]) - IM(cc[ac+1])), taui);

                RE(ch[ah+l1]) = RE(c2) + IM(c3);
                IM(ch[ah+l1]) = IM(c2) - RE(c3);
                RE(ch[ah+2*l1]) = RE(c2) - IM(c3);
                IM(ch[ah+2*l1]) = IM(c2) + RE(c3);
            }
        }
    } else {
        if (isign == 1)
        {
            for (k = 0; k < l1; k++)
            {
                for (i = 0; i < ido; i++)
                {
                    ac = i + (3*k+1)*ido;
                    ah = i + k * ido;

                    RE(t2) = RE(cc[ac]) + RE(cc[ac+ido]);
                    RE(c2) = RE(cc[ac-ido]) + MUL_F(RE(t2),taur);
                    IM(t2) = IM(cc[ac]) + IM(cc[ac+ido]);
                    IM(c2) = IM(cc[ac-ido]) + MUL_F(IM(t2),taur);

                    RE(ch[ah]) = RE(cc[ac-ido]) + RE(t2);
                    IM(ch[ah]) = IM(cc[ac-ido]) + IM(t2);

                    RE(c3) = MUL_F((RE(cc[ac]) - RE(cc[ac+ido])), taui);
                    IM(c3) = MUL_F((IM(cc[ac]) - IM(cc[ac+ido])), taui);

                    RE(d2) = RE(c2) - IM(c3);
                    IM(d3) = IM(c2) - RE(c3);
                    RE(d3) = RE(c2) + IM(c3);
                    IM(d2) = IM(c2) + RE(c3);

#if 1
                    ComplexMult(&IM(ch[ah+l1*ido]), &RE(ch[ah+l1*ido]),
                        IM(d2), RE(d2), RE(wa1[i]), IM(wa1[i]));
                    ComplexMult(&IM(ch[ah+2*l1*ido]), &RE(ch[ah+2*l1*ido]),
                        IM(d3), RE(d3), RE(wa2[i]), IM(wa2[i]));
#else
                    ComplexMult(&RE(ch[ah+l1*ido]), &IM(ch[ah+l1*ido]),
                        RE(d2), IM(d2), RE(wa1[i]), IM(wa1[i]));
                    ComplexMult(&RE(ch[ah+2*l1*ido]), &IM(ch[ah+2*l1*ido]),
                        RE(d3), IM(d3), RE(wa2[i]), IM(wa2[i]));
#endif
                }
            }
        } else {
            for (k = 0; k < l1; k++)
            {
                for (i = 0; i < ido; i++)
//.........这里部分代码省略.........
开发者ID:TravisKraatz,项目名称:cinelerra,代码行数:101,代码来源:cfft.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ READ函数代码示例发布时间:2022-05-30
下一篇:
C++ RDMEM函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap