You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
828 B
47 lines
828 B
|
|
|
|
#include "oc_array.h"
|
|
|
|
namespace opencorr
|
|
{
|
|
float** new2D(int dimension1, int dimension2)
|
|
{
|
|
float** ptr = nullptr;
|
|
hCreatePtr(ptr, dimension1, dimension2);
|
|
return ptr;
|
|
}
|
|
|
|
void delete2D(float**& ptr)
|
|
{
|
|
if (ptr == nullptr) return;
|
|
hDestroyPtr(ptr);
|
|
}
|
|
|
|
float*** new3D(int dimension1, int dimension2, int dimension3)
|
|
{
|
|
float*** ptr = nullptr;
|
|
hCreatePtr(ptr, dimension1, dimension2, dimension3);
|
|
return ptr;
|
|
}
|
|
|
|
void delete3D(float***& ptr)
|
|
{
|
|
if (ptr == nullptr) return;
|
|
hDestroyPtr(ptr);
|
|
}
|
|
|
|
float**** new4D(int dimension1, int dimension2, int dimension3, int dimension4)
|
|
{
|
|
float**** ptr = nullptr;
|
|
hCreatePtr(ptr, dimension1, dimension2, dimension3, dimension4);
|
|
return ptr;
|
|
}
|
|
|
|
void delete4D(float****& ptr)
|
|
{
|
|
if (ptr == nullptr) return;
|
|
hDestroyPtr(ptr);
|
|
}
|
|
|
|
}//namespace opencorr
|
|
|
|
|