File: mtx_impl.cc

package info (click to toggle)
wp2latex 3.97%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,228 kB
  • sloc: cpp: 45,091; ansic: 8,998; asm: 2,435; makefile: 529; sh: 19
file content (46 lines) | stat: -rw-r--r-- 1,139 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/****************************************************
* unit:    matrix           release 0.7             *
* purpose: implementation of concretized templates. *
* licency:   GPL or LGPL                            *
* Copyright: (c) 1998-2016 Jaroslav Fojtik          *
*****************************************************/
#include <stdio.h>
#include <math.h>

//#include "matrix.h"
#include "matrix.cc"

#define FLOAT float

 
#if (!defined(_MSC_VER)) && (!defined(__BORLANDC__)) || (__BORLANDC__ >= 0x0540) || (_MSC_VER >= 1310)
//New conventions for expanding templates
template class matrix<FLOAT>;

 #if !defined(__GNUC__)
  #define USE_MTX_T
 #else
  #if (__GNUC__ < 4)
   #define USE_MTX_T
  #endif
 #endif
   
 #ifdef USE_MTX_T
  template matrix<FLOAT>::matrix(void);
  template matrix<FLOAT>::matrix(TSIZE u1,TSIZE u2);
  template matrix<FLOAT>::matrix(TSIZE u1,TSIZE u2, FLOAT i);
  #undef USE_MTX_T
 #endif

#else

//Old conventions for expanding templates
void UseMTX_FLOAT(void)
{
 matrix<FLOAT> m;
 matrix<FLOAT> m2(0,0,(FLOAT)1.1);
 #ifdef _MSC_VER
 m=m2*m2;
 #endif
}
#endif