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

« back to all changes in this revision

Viewing changes to numpy/doc/swig/test/Vector.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 VECTOR_H
 
2
#define VECTOR_H
 
3
 
 
4
// The following macro defines the prototypes for a family of
 
5
// functions that work with 1D arrays with the forms
 
6
//
 
7
//     TYPE SNAMELength( TYPE vector[3]);
 
8
//     TYPE SNAMEProd(   TYPE * series, int size);
 
9
//     TYPE SNAMESum(    int size, TYPE * series);
 
10
//     void SNAMEReverse(TYPE array[3]);
 
11
//     void SNAMEOnes(   TYPE * array,  int size);
 
12
//     void SNAMEZeros(  int size, TYPE * array);
 
13
//     void SNAMEEOSplit(TYPE vector[3], TYPE even[3], TYPE odd[3]);
 
14
//     void SNAMETwos(   TYPE * twoVec, int size);
 
15
//     void SNAMEThrees( int size, TYPE * threeVec);
 
16
//
 
17
// for any specified type TYPE (for example: short, unsigned int, long
 
18
// long, etc.) with given short name SNAME (for example: short, uint,
 
19
// longLong, etc.).  The macro is then expanded for the given
 
20
// TYPE/SNAME pairs.  The resulting functions are for testing numpy
 
21
// interfaces, respectively, for:
 
22
//
 
23
//  * 1D input arrays, hard-coded length
 
24
//  * 1D input arrays
 
25
//  * 1D input arrays, data last
 
26
//  * 1D in-place arrays, hard-coded length
 
27
//  * 1D in-place arrays
 
28
//  * 1D in-place arrays, data last
 
29
//  * 1D argout arrays, hard-coded length
 
30
//  * 1D argout arrays
 
31
//  * 1D argout arrays, data last
 
32
//
 
33
#define TEST_FUNC_PROTOS(TYPE, SNAME) \
 
34
\
 
35
TYPE SNAME ## Length( TYPE vector[3]); \
 
36
TYPE SNAME ## Prod(   TYPE * series, int size); \
 
37
TYPE SNAME ## Sum(    int size, TYPE * series); \
 
38
void SNAME ## Reverse(TYPE array[3]); \
 
39
void SNAME ## Ones(   TYPE * array,  int size); \
 
40
void SNAME ## Zeros(  int size, TYPE * array); \
 
41
void SNAME ## EOSplit(TYPE vector[3], TYPE even[3], TYPE odd[3]); \
 
42
void SNAME ## Twos(   TYPE * twoVec, int size); \
 
43
void SNAME ## Threes( int size, TYPE * threeVec); \
 
44
 
 
45
TEST_FUNC_PROTOS(signed char       , schar    )
 
46
TEST_FUNC_PROTOS(unsigned char     , uchar    )
 
47
TEST_FUNC_PROTOS(short             , short    )
 
48
TEST_FUNC_PROTOS(unsigned short    , ushort   )
 
49
TEST_FUNC_PROTOS(int               , int      )
 
50
TEST_FUNC_PROTOS(unsigned int      , uint     )
 
51
TEST_FUNC_PROTOS(long              , long     )
 
52
TEST_FUNC_PROTOS(unsigned long     , ulong    )
 
53
TEST_FUNC_PROTOS(long long         , longLong )
 
54
TEST_FUNC_PROTOS(unsigned long long, ulongLong)
 
55
TEST_FUNC_PROTOS(float             , float    )
 
56
TEST_FUNC_PROTOS(double            , double   )
 
57
 
 
58
#endif