17f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/* 27f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project * Copyright (C) 2008 The Android Open Source Project 37f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project * 47f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project * Licensed under the Apache License, Version 2.0 (the "License"); 57f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project * you may not use this file except in compliance with the License. 67f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project * You may obtain a copy of the License at 77f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project * 87f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project * http://www.apache.org/licenses/LICENSE-2.0 97f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project * 107f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project * Unless required by applicable law or agreed to in writing, software 117f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project * distributed under the License is distributed on an "AS IS" BASIS, 127f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 137f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project * See the License for the specific language governing permissions and 147f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project * limitations under the License. 157f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project */ 167f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 177f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project#ifndef bts_INT16MAT2D_EM_H 187f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project#define bts_INT16MAT2D_EM_H 197f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 207f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/* ---- includes ----------------------------------------------------------- */ 217f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 227f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project#include "b_BasicEm/Basic.h" 237f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project#include "b_BasicEm/Phase.h" 247f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project#include "b_TensorEm/Int16Vec2D.h" 257f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 267f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/* ---- related objects --------------------------------------------------- */ 277f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 287f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/* ---- typedefs ----------------------------------------------------------- */ 297f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 307f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/* ---- constants ---------------------------------------------------------- */ 317f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 327f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/* ---- object definition -------------------------------------------------- */ 337f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 347f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/** 2d matrix */ 357f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Projectstruct bts_Int16Mat2D 367f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project{ 377f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 387f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project /* ---- private data --------------------------------------------------- */ 397f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 407f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project /* ---- public data ---------------------------------------------------- */ 417f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 427f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project /** xx component */ 437f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project int16 xxE; 447f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 457f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project /** xy component */ 467f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project int16 xyE; 477f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 487f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project /** yx component */ 497f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project int16 yxE; 507f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 517f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project /** yy component */ 527f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project int16 yyE; 537f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 547f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project /** fixed point position */ 557f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project int16 bbpE; 567f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project}; 577f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 587f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/* ---- associated objects ------------------------------------------------- */ 597f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 607f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/* ---- external functions ------------------------------------------------- */ 617f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 627f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/* ---- \ghd{ constructor/destructor } ------------------------------------- */ 637f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 647f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/* ---- \ghd{ operators } -------------------------------------------------- */ 657f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 667f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/* ---- \ghd{ query functions } -------------------------------------------- */ 677f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 687f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/* ---- \ghd{ modify functions } ------------------------------------------- */ 697f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 707f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/* ---- \ghd{ memory I/O } ------------------------------------------------- */ 717f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 727f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/* ---- \ghd{ exec functions } --------------------------------------------- */ 737f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 747f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/** creates identity matrix */ 757f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Projectstruct bts_Int16Mat2D bts_Int16Mat2D_createIdentity( void ); 767f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 777f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/** creates rotation matrix */ 787f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Projectstruct bts_Int16Mat2D bts_Int16Mat2D_createRotation( phase16 angleA ); 797f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 807f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/** creates rigid matrix (scale & rotation) */ 817f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Projectstruct bts_Int16Mat2D bts_Int16Mat2D_createRigid( phase16 angleA, struct flt16 scaleA ); 827f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 837f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/** scales matrix by a factor */ 847f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Projectvoid bts_Int16Mat2D_scale( struct bts_Int16Mat2D* ptrA, struct flt16 scaleA ); 857f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 867f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/** multiplies matrix with vecA; returns resulting vector */ 877f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Projectstruct bts_Int16Vec2D bts_Int16Mat2D_map( const struct bts_Int16Mat2D* matPtrA, 887f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project const struct bts_Int16Vec2D* vecPtrA ); 897f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 907f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project/** multiplies matrix with matA; returns resulting matrix */ 917f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Projectstruct bts_Int16Mat2D bts_Int16Mat2D_mul( const struct bts_Int16Mat2D* mat1PtrA, 927f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project const struct bts_Int16Mat2D* mat2PtrA ); 937f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 947f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project#endif /* bts_INT16MAT2D_EM_H */ 957f81d9b6fa7f2ec161b682622db577a28c90b49fThe Android Open Source Project 96