Ice Sheet System Model  4.18
Code documentation
MemOps.cpp
Go to the documentation of this file.
1 /*
2  * MemOps.cpp
3  *
4  * Created on: Sep 10, 2013
5  * Author: utke
6  */
7 
8 #ifdef HAVE_CONFIG_H
9  #include <config.h>
10 #else
11 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
12 #endif
13 
14 #include "MemOps.h"
15 
16 #if defined(_HAVE_ADOLC_) && !defined(_WRAPPERS_)
17 template <> adouble* xNew(unsigned int size, const char* const contig) {
18  if (contig[0] == 't' || contig[0] == 'c')
19  ensureContiguousLocations(size);
20 
21  adouble* aT_p=new adouble[size];
22  assert(aT_p);
23  return aT_p;
24 }
25 #endif
MemOps.h
xNew
T * xNew(unsigned int size)
Definition: MemOps.h:24