blob: a17d5458138d34a008538004d0c5a08705162986 [file] [log] [blame]
Austin Schuh9a24b372018-01-28 16:12:29 -08001/**************************************************************************************************
2* *
3* This file is part of BLASFEO. *
4* *
5* BLASFEO -- BLAS For Embedded Optimization. *
6* Copyright (C) 2016-2017 by Gianluca Frison. *
7* Developed at IMTEK (University of Freiburg) under the supervision of Moritz Diehl. *
8* All rights reserved. *
9* *
10* HPMPC is free software; you can redistribute it and/or *
11* modify it under the terms of the GNU Lesser General Public *
12* License as published by the Free Software Foundation; either *
13* version 2.1 of the License, or (at your option) any later version. *
14* *
15* HPMPC is distributed in the hope that it will be useful, *
16* but WITHOUT ANY WARRANTY; without even the implied warranty of *
17* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
18* See the GNU Lesser General Public License for more details. *
19* *
20* You should have received a copy of the GNU Lesser General Public *
21* License along with HPMPC; if not, write to the Free Software *
22* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
23* *
24* Author: Gianluca Frison, giaf (at) dtu.dk *
25* gianluca.frison (at) imtek.uni-freiburg.de *
26* *
27**************************************************************************************************/
28
29#include <stdlib.h>
30#include <stdio.h>
31#include <math.h>
32
33#include "../include/blasfeo_common.h"
34
35
36
37#if defined(LA_HIGH_PERFORMANCE)
38
39
40
41
42void m_cvt_d2s_strvec(int m, struct d_strvec *vd, int vdi, struct s_strvec *vs, int vsi)
43 {
44 double *pd = vd->pa+vdi;
45 float *ps = vs->pa+vsi;
46 int ii;
47 for(ii=0; ii<m; ii++)
48 {
49 ps[ii] = (float) pd[ii];
50 }
51 return;
52 }
53
54
55
56void m_cvt_s2d_strvec(int m, struct s_strvec *vs, int vsi, struct d_strvec *vd, int vdi)
57 {
58 double *pd = vd->pa+vdi;
59 float *ps = vs->pa+vsi;
60 int ii;
61 for(ii=0; ii<m; ii++)
62 {
63 pd[ii] = (double) ps[ii];
64 }
65 return;
66 }
67
68
69
70void m_cvt_d2s_strmat(int m, int n, struct d_strmat *Md, int mid, int nid, struct s_strmat *Ms, int mis, int nis)
71 {
72 printf("\nm_cvt_d2s_strmat: feature not implmeneted yet\n\n");
73 exit(1);
74 return;
75 }
76
77
78
79void m_cvt_s2d_strmat(int m, int n, struct s_strmat *Ms, int mis, int nis, struct d_strmat *Md, int mid, int nid)
80 {
81 printf("\nm_cvt_s2d_strmat: feature not implmeneted yet\n\n");
82 exit(1);
83 return;
84 }
85
86
87
88#else
89
90#error : wrong LA choice
91
92#endif
93