Skip to content

/github/workspace/src/FilteringFunctions/plp_correlate_i32.c

Functions

Name
void plp_correlate_i32(const int32_t * pSrcA, const uint32_t srcALen, const int32_t * pSrcB, const uint32_t srcBLen, int32_t *restrict pRes)
Glue code for correlation of 32-bit integer vectors.

Functions Documentation

function plp_correlate_i32

void plp_correlate_i32(
    const int32_t * pSrcA,
    const uint32_t srcALen,
    const int32_t * pSrcB,
    const uint32_t srcBLen,
    int32_t *__restrict__ pRes
)

Glue code for correlation of 32-bit integer vectors.

Parameters:

  • pSrcA points to the first input vector
  • srcALen Length of the first input vector
  • pSrcB points to the second input vector
  • srcBLen Length of the second input vector
  • pRes output result returned here

Return: none

Source code

/* =====================================================================
 * Project:      PULP DSP Library
 * Title:        plp_correlate_i32.c
 * Description:  Correlation glue code for 32-Bit integer vectors
 *
 * $Date:        03.07.2020
 *
 * Target Processor: PULP cores
 * ===================================================================== */
/*
 * Copyright (C) 2020 ETH Zurich and University of Bologna.
 *
 * Author: Moritz Scherer, ETH Zurich
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the License); you may
 * not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "plp_math.h"

void plp_correlate_i32(const int32_t *pSrcA,
                       const uint32_t srcALen,
                       const int32_t *pSrcB,
                       const uint32_t srcBLen,
                       int32_t *__restrict__ pRes) {

    if (hal_cluster_id() == ARCHI_FC_CID) {
        plp_correlate_i32s_rv32im(pSrcA, srcALen, pSrcB, srcBLen, pRes);
    } else {
        plp_correlate_i32s_xpulpv2(pSrcA, srcALen, pSrcB, srcBLen, pRes);
    }
}

Updated on 2023-03-01 at 16:16:32 +0000