~jtaylor/ubuntu/precise/python-numpy/multiarch-fix-818867

« back to all changes in this revision

Viewing changes to numpy/doc/swig/test/Tensor.h

  • Committer: Bazaar Package Importer
  • Author(s): Ondrej Certik, Riku Voipio, Tiziano Zito, Carlos Galisteo, Ondrej Certik
  • Date: 2008-07-08 15:08:16 UTC
  • mfrom: (0.1.21 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080708150816-ekf992jcp2k1eua3
Tags: 1:1.1.0-3
[ Riku Voipio ]
* debian/control: atlas is not available on armel, and after a quick look
  neither on alpha. I'd also suggest dropping
  libatlas-sse-dev|libatlas-sse2-dev|libatlas-3dnow-dev alternative combo
  away, these are potentially dangerous on buildd's. Ondrej: dropped.
  (Closes: #489568)

[ Tiziano Zito ]
* patch: build _dotblas.c when ATLAS is not installed, build-conflict with
  atlas, build-depend on blas+lapack only, as it used to be (Closes: #489726)

[ Carlos Galisteo ]
* debian/control
  - Added Homepage field.

[ Ondrej Certik ]
* Checked the package on i386 and amd64, both with and without atlas, all
  tests run and the numpy package is faster if atlas is around. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef TENSOR_H
 
2
#define TENSOR_H
 
3
 
 
4
// The following macro defines the prototypes for a family of
 
5
// functions that work with 3D arrays with the forms
 
6
//
 
7
//     TYPE SNAMENorm(   TYPE tensor[2][2][2]);
 
8
//     TYPE SNAMEMax(    TYPE * tensor, int rows, int cols, int num);
 
9
//     TYPE SNAMEMin(    int rows, int cols, int num, TYPE * tensor);
 
10
//     void SNAMEScale(  TYPE array[3][3][3]);
 
11
//     void SNAMEFloor(  TYPE * array,  int rows, int cols, int num, TYPE floor);
 
12
//     void SNAMECeil(   int rows, int cols, int num, TYPE * array,  TYPE ceil );
 
13
//     void SNAMELUSplit(TYPE in[3][3][3], TYPE lower[3][3][3], TYPE upper[3][3][3]);
 
14
//
 
15
// for any specified type TYPE (for example: short, unsigned int, long
 
16
// long, etc.) with given short name SNAME (for example: short, uint,
 
17
// longLong, etc.).  The macro is then expanded for the given
 
18
// TYPE/SNAME pairs.  The resulting functions are for testing numpy
 
19
// interfaces, respectively, for:
 
20
//
 
21
//  * 3D input arrays, hard-coded lengths
 
22
//  * 3D input arrays
 
23
//  * 3D input arrays, data last
 
24
//  * 3D in-place arrays, hard-coded lengths
 
25
//  * 3D in-place arrays
 
26
//  * 3D in-place arrays, data last
 
27
//  * 3D argout arrays, hard-coded length
 
28
//
 
29
#define TEST_FUNC_PROTOS(TYPE, SNAME) \
 
30
\
 
31
TYPE SNAME ## Norm(   TYPE tensor[2][2][2]); \
 
32
TYPE SNAME ## Max(    TYPE * tensor, int rows, int cols, int num); \
 
33
TYPE SNAME ## Min(    int rows, int cols, int num, TYPE * tensor); \
 
34
void SNAME ## Scale(  TYPE array[3][3][3], TYPE val); \
 
35
void SNAME ## Floor(  TYPE * array, int rows, int cols, int num, TYPE floor); \
 
36
void SNAME ## Ceil(   int rows, int cols, int num, TYPE * array, TYPE ceil ); \
 
37
void SNAME ## LUSplit(TYPE tensor[2][2][2], TYPE lower[2][2][2], TYPE upper[2][2][2]);
 
38
 
 
39
TEST_FUNC_PROTOS(signed char       , schar    )
 
40
TEST_FUNC_PROTOS(unsigned char     , uchar    )
 
41
TEST_FUNC_PROTOS(short             , short    )
 
42
TEST_FUNC_PROTOS(unsigned short    , ushort   )
 
43
TEST_FUNC_PROTOS(int               , int      )
 
44
TEST_FUNC_PROTOS(unsigned int      , uint     )
 
45
TEST_FUNC_PROTOS(long              , long     )
 
46
TEST_FUNC_PROTOS(unsigned long     , ulong    )
 
47
TEST_FUNC_PROTOS(long long         , longLong )
 
48
TEST_FUNC_PROTOS(unsigned long long, ulongLong)
 
49
TEST_FUNC_PROTOS(float             , float    )
 
50
TEST_FUNC_PROTOS(double            , double   )
 
51
 
 
52
#endif