Revision 1022

trunk/src/df1b2-separable/df1b2fn2.cpp (revision 1022)
8 8
 * \file
9 9
 * Description not yet available.
10 10
 */
11
#include <cstring>
11 12
#if !defined(__BORLANDC__) && !defined(_MSC_VER)
12 13
#include <inttypes.h>
13 14
#endif
......
120 121
 * Description not yet available.
121 122
 * \param
122 123
 */
123
  void df1b2variable::initialize(void)
124
  {
125
    //double * tmp=ptr+1;
124
void df1b2variable::initialize(void)
125
{
126 126
#if defined(__CHECK_MEMORY__)
127
    if (sanity_flag)
128
      df1b2variable::pool->sanity_check();
129
#endif
130
    int nvar=((twointsandptr*)ptr)->ptr->nvar;
131
    int blocksize=get_blocksize(nvar);
132
    for (double * tmp=ptr+2;tmp<ptr+blocksize-1;*tmp++=0);
133
   /*
134
    for (int i=1;i<blocksize;i++)
135
    {
136
      *tmp++=0.0;
137
    }
138
   */
127
  if (sanity_flag)
128
  {
129
    df1b2variable::pool->sanity_check();
139 130
  }
131
#endif
132
  int nvar=((twointsandptr*)ptr)->ptr->nvar;
133
  initialize(nvar);
134
}
140 135
        
141 136
/**
142 137
 * Description not yet available.
143 138
 * \param
144 139
 */
145
  void df1b2variable::initialize(int n)
146
  {
147
    int bs=get_blocksize(n);
148
    for (double * tmp=ptr+2;tmp<ptr+bs-1;*tmp++=0);
149
  }
140
void df1b2variable::initialize(int n)
141
{
142
  //int bs=get_blocksize(n);
143
  //for (double * tmp=ptr+2;tmp<ptr+bs-1;*tmp++=0);
144
  int nbytes = (get_blocksize(n) - 2) * sizeof(double);
145
  memset(ptr + 2, 0, nbytes);
146
}
150 147
        
151 148
/**
152 149
 * Description not yet available.

Also available in: Unified diff