~ubuntu-branches/ubuntu/wily/freefem++/wily

« back to all changes in this revision

Viewing changes to src/fflib/ffstack.hpp

  • Committer: Package Import Robot
  • Author(s): Dimitrios Eftaxiopoulos, Dimitrios Eftaxiopoulos, Christophe Trophime
  • Date: 2013-09-12 00:02:58 UTC
  • mfrom: (1.2.1) (11.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130912000258-aclq2zfa1svt0p3x
Tags: 3.25-1
[ Dimitrios Eftaxiopoulos ]
* Imported Upstream version 3.25 (Closes: #701161 #706714)
* Change installation directory of header-like *.idp files
  from /usr/lib/freefem++ to /usr/include/freefem++, in order
  to fix a lintian warning
* Update patch to examples++-load/Makefile.am in order to enable
  functioning of load *.so and include *.idp commands in *.edp
  scripts
* Delete patches to src/Graphics/sansgraph.cpp and
  src/Graphics/xglrgraph.cpp because they are not needed any more
* Fix lintian warning about missing LDFLAGS
* Override dh_auto_test in debian/rules, such that in case it is 
  used, it completes executing all *.edp example files, regardless
  of aborting on some of them
* Add libmetis-dev to build-deps in d/control
* Remove libparmetis-dev from build deps
* Add --parallel option to dh $@ in debian/rules
* Add hardening compilation flags to mpic++
* Allow testing of compiling and running the example files after build

[ Christophe Trophime ]
* update C. Trophime email
* add support for nlopt, ipopt - simplify debian/rules
* upload CT changes to 3.20
* add patch for configure
* add patch for examples++-mpi
* fix bamg install
* add corrected scripts to build plugins
* add patch for properly build examples++-load
* add lintian overrides for libfreefem++
* add some missing files
* update patches
* update rules
* reorder BuildDepends - comment out unsupported libs

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/// \file
 
2
 
1
3
// -*- Mode : c++ -*-
2
4
//
3
5
// SUMMARY  :      
50
52
#define NEWFFSTACKxxx
51
53
 
52
54
#ifndef NEWFFSTACK
53
 
 
 
55
typedef void StackType;
54
56
typedef void *Stack;
55
57
 
56
58
 
57
59
 const Stack  NullStack=0;
58
60
//typedef StackType& Stack;
59
 
 
 
61
inline Stack pvoid2Stack(void * pv) { return pv;}
60
62
 
61
63
template<class T>
62
64
T * Stack_offset (Stack stack,size_t offset)  
89
91
};
90
92
 
91
93
 
92
 
 
93
94
#else
94
95
 
95
96
struct StackType;
96
97
 
97
98
//typedef void *Stack;
98
99
 
 
100
/// Stack used by CListOfInst::eval()
99
101
typedef StackType & Stack;
100
102
 
101
103
struct StackType {
106
108
 operator void *() { return stack;}
107
109
 operator long *() { return (long *)(void *)stack;}
108
110
 operator void **() {return (void **) (void *) stack;}
 
111
 operator StackType *() { return this;}
109
112
 template<class T> 
110
113
 T * Offset(size_t offset){ return (T*) (void*) (stack+offset);}
111
114
 template<class T> 
121
124
 void clean() { delete []stack; delete [] MeshPointStack; }
122
125
};
123
126
 
124
 
StackType * NullStackPtr= 0;
125
 
StackType & NullStack(*NullStackPtr);
 
127
inline Stack pvoid2Stack(void * pv) { return *static_cast<StackType *>(pv) ;}
 
128
static  StackType * NullStackPtr= 0;
 
129
static StackType & NullStack(*NullStackPtr);
126
130
//typedef StackType& Stack;
127
131
 
128
132
 
203
207
              { 
204
208
                topmemory4tmp=0;// clean the tmp allocation 
205
209
                if(stackptr.size()>=20 && verbosity>2) 
206
 
                   cout << "\n\t\t ### big?? ptr/lg clean " << stackptr.size() << " ptr's\n ";
 
210
                  //FFCS: nothing on following line for tests/compare
 
211
                   cout << "\n\t\t ### big?? ptr/lg clean " << stackptr.size() << " ptr's\n";
207
212
                
208
213
                for (iterator i=stackptr.end(); i != stackptr.begin();)
209
214
                {
351
356
 // s.clean();
352
357
 }
353
358
#else
354
 
  a faire ....
 
359
//  a faire ....
 
360
 
 
361
/// Called to create a new #Stack used to evaluate a FreeFem++ script in CListOfInst::eval()
355
362
inline Stack newStack(size_t l)
356
363
 {
357
364
/*  Stack thestack = new char[l];