OSDN Git Service

Merge branch 'lineage-16.0' of https://github.com/me176c-dev/android_hardware_iio...
[android-x86/hardware-intel-libsensors.git] / matrix-ops.h
1 /*
2 // Copyright (c) 2015 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //      http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 */
16
17 #ifndef __MATRIX_OPS__
18 #define __MATRIX_OPS__
19
20 void transpose (int rows, int cols, double m[rows][cols], double m_trans[cols][rows]);
21 void multiply (int m, int n, int p, double m1[m][n], double m2[n][p], double result[m][p]);
22 void invert (int s, double m[s][s],  double m_inv[s][s]);
23 void multiply_scalar_inplace(int rows, int cols, double m[rows][cols], double scalar);
24 void assign (int rows, int cols, double m[rows][cols], double m1[rows][cols]);
25 void substract (int rows, int cols, double m1[rows][cols], double m2[rows][cols], double res[rows][cols]);
26
27 #endif