/* ---------------------------------------------------------------------- * Project: CMSIS DSP Library * Title: arm_mat_scale_f32.c * Description: Multiplies a floating-point matrix by a scalar * * $Date: 18. March 2019 *$Revision: V1.6.0 * * Target Processor: Cortex-M cores * -------------------------------------------------------------------- */ /* * Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved. * * 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 "arm_math.h" /** @ingroup groupMatrix */ /** @defgroup MatrixScale Matrix Scale Multiplies a matrix by a scalar. This is accomplished by multiplying each element in the matrix by the scalar. For example: \image html MatrixScale.gif "Matrix Scaling of a 3 x 3 matrix" The function checks to make sure that the input and output matrices are of the same size. In the fixed-point Q15 and Q31 functions, scale is represented by a fractional multiplication scaleFract and an arithmetic shift shift. The shift allows the gain of the scaling operation to exceed 1.0. The overall scale factor applied to the fixed-point data is