Commit 984017ef authored by KLOCZKO Thibaud's avatar KLOCZKO Thibaud
Browse files

Add ZUC aka Ze Ultimate Container.

parent 94845a88
This diff is collapsed.
......@@ -16,6 +16,29 @@
#include <limits.h>
// /////////////////////////////////////////////////////////////////
void dtkRoundUpNextPowerOfTwo(quint32& nalloc)
{
nalloc |= nalloc >> 1;
nalloc |= nalloc >> 2;
nalloc |= nalloc >> 4;
nalloc |= nalloc >> 8;
nalloc |= nalloc >> 16;
++nalloc;
};
void dtkRoundUpNextPowerOfTwo(quint64& nalloc)
{
nalloc |= nalloc >> 1;
nalloc |= nalloc >> 2;
nalloc |= nalloc >> 4;
nalloc |= nalloc >> 8;
nalloc |= nalloc >> 16;
nalloc |= nalloc >> 32;
++nalloc;
};
qintptr dtkAllocMore(qintptr alloc, qintptr extra)
{
Q_ASSERT(alloc >= 0 && extra >= 0);
......@@ -28,7 +51,7 @@ qintptr dtkAllocMore(qintptr alloc, qintptr extra)
// Assuming container is growing, always overshoot
//--nalloc;
dtkNextPowerOfTwo<quintptr>::roundUp(nalloc);
dtkRoundUpNextPowerOfTwo(nalloc);
Q_ASSERT(nalloc > quint64(alloc + extra));
......
......@@ -20,41 +20,6 @@
//
// /////////////////////////////////////////////////////////////////
template <typename T> struct dtkNextPowerOfTwo;
template <> struct dtkNextPowerOfTwo<quint32>
{
static void roundUp(quint32& nalloc)
{
nalloc |= nalloc >> 1;
nalloc |= nalloc >> 2;
nalloc |= nalloc >> 4;
nalloc |= nalloc >> 8;
nalloc |= nalloc >> 16;
++nalloc;
}
};
template <> struct dtkNextPowerOfTwo<quint64>
{
static void roundUp(quint64& nalloc)
{
nalloc |= nalloc >> 1;
nalloc |= nalloc >> 2;
nalloc |= nalloc >> 4;
nalloc |= nalloc >> 8;
nalloc |= nalloc >> 16;
nalloc |= nalloc >> 32;
++nalloc;
}
};
qintptr dtkAllocMore(qintptr alloc, qintptr extra);
// /////////////////////////////////////////////////////////////////
//
// /////////////////////////////////////////////////////////////////
template <typename T> struct dtkArrayDataTemplate;
template <> struct dtkArrayDataTemplate<qint32>
......
......@@ -20,17 +20,17 @@ project(dtkMath)
## #################################################################
set(${PROJECT_NAME}_HEADERS
dtkArray.h
dtkArray.tpp
dtkMath
dtkMath.h
dtkMathArray.h
dtkMathArray.tpp
dtkMatrix
dtkMatrix.h
dtkMatrix.tpp)
set(${PROJECT_NAME}_SOURCES
dtkArray.cpp
dtkMath.cpp
dtkMathArray.cpp
dtkMatrix.cpp)
## #################################################################
......
/* dtkArray.h ---
/* dtkMathArray.h ---
*
* Author: Thibaud Kloczko
* Created: Tue Jul 23 14:56:30 2013 (+0200)
......@@ -24,56 +24,56 @@
#if defined(Q_DECL_ALIGN) && defined(Q_ALIGNOF)
#if defined(Q_CC_GNU) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
typedef char __attribute__((__may_alias__)) dtkArrayAlignedChar;
typedef char __attribute__((__may_alias__)) dtkMathArrayAlignedChar;
#else
typedef char dtkArrayAlignedChar;
typedef char dtkMathArrayAlignedChar;
#endif
template <typename T, qlonglong PreallocSize, size_t AlignT> struct dtkArrayAlignedPrealloc;
template <typename T, qlonglong PreallocSize, size_t AlignT> struct dtkMathArrayAlignedPrealloc;
template <typename T, qlonglong PreallocSize> struct dtkArrayAlignedPrealloc<T, PreallocSize, 1>
template <typename T, qlonglong PreallocSize> struct dtkMathArrayAlignedPrealloc<T, PreallocSize, 1>
{
dtkArrayAlignedChar Q_DECL_ALIGN(1) data[sizeof(T) * PreallocSize];
dtkMathArrayAlignedChar Q_DECL_ALIGN(1) data[sizeof(T) * PreallocSize];
};
template <typename T, qlonglong PreallocSize> struct dtkArrayAlignedPrealloc<T, PreallocSize, 2>
template <typename T, qlonglong PreallocSize> struct dtkMathArrayAlignedPrealloc<T, PreallocSize, 2>
{
dtkArrayAlignedChar Q_DECL_ALIGN(2) data[sizeof(T) * PreallocSize];
dtkMathArrayAlignedChar Q_DECL_ALIGN(2) data[sizeof(T) * PreallocSize];
};
template <typename T, qlonglong PreallocSize> struct dtkArrayAlignedPrealloc<T, PreallocSize, 4>
template <typename T, qlonglong PreallocSize> struct dtkMathArrayAlignedPrealloc<T, PreallocSize, 4>
{
dtkArrayAlignedChar Q_DECL_ALIGN(4) data[sizeof(T) * PreallocSize];
dtkMathArrayAlignedChar Q_DECL_ALIGN(4) data[sizeof(T) * PreallocSize];
};
template <typename T, qlonglong PreallocSize> struct dtkArrayAlignedPrealloc<T, PreallocSize, 8>
template <typename T, qlonglong PreallocSize> struct dtkMathArrayAlignedPrealloc<T, PreallocSize, 8>
{
dtkArrayAlignedChar Q_DECL_ALIGN(8) data[sizeof(T) * PreallocSize];
dtkMathArrayAlignedChar Q_DECL_ALIGN(8) data[sizeof(T) * PreallocSize];
};
template <typename T, qlonglong PreallocSize> struct dtkArrayAlignedPrealloc<T, PreallocSize, 16>
template <typename T, qlonglong PreallocSize> struct dtkMathArrayAlignedPrealloc<T, PreallocSize, 16>
{
dtkArrayAlignedChar Q_DECL_ALIGN(16) data[sizeof(T) * PreallocSize];
dtkMathArrayAlignedChar Q_DECL_ALIGN(16) data[sizeof(T) * PreallocSize];
};
template <typename T, qlonglong PreallocSize> struct dtkArrayAlignedPrealloc<T, PreallocSize, 32>
template <typename T, qlonglong PreallocSize> struct dtkMathArrayAlignedPrealloc<T, PreallocSize, 32>
{
dtkArrayAlignedChar Q_DECL_ALIGN(32) data[sizeof(T) * PreallocSize];
dtkMathArrayAlignedChar Q_DECL_ALIGN(32) data[sizeof(T) * PreallocSize];
};
template <typename T, qlonglong PreallocSize> struct dtkArrayAlignedPrealloc<T, PreallocSize, 64>
template <typename T, qlonglong PreallocSize> struct dtkMathArrayAlignedPrealloc<T, PreallocSize, 64>
{
dtkArrayAlignedChar Q_DECL_ALIGN(64) data[sizeof(T) * PreallocSize];
dtkMathArrayAlignedChar Q_DECL_ALIGN(64) data[sizeof(T) * PreallocSize];
};
template <typename T, qlonglong PreallocSize> struct dtkArrayAlignedPrealloc<T, PreallocSize, 128>
template <typename T, qlonglong PreallocSize> struct dtkMathArrayAlignedPrealloc<T, PreallocSize, 128>
{
dtkArrayAlignedChar Q_DECL_ALIGN(128) data[sizeof(T) * PreallocSize];
dtkMathArrayAlignedChar Q_DECL_ALIGN(128) data[sizeof(T) * PreallocSize];
};
#else
template <typename T, qlonglong PreallocSize, size_t AlignT> union dtkArrayAlignedPrealloc
template <typename T, qlonglong PreallocSize, size_t AlignT> union dtkMathArrayAlignedPrealloc
{
char data[sizeof(T) * PreallocSize];
qint64 q_for_alignment_1;
......@@ -83,16 +83,16 @@ template <typename T, qlonglong PreallocSize, size_t AlignT> union dtkArrayAlign
#endif
// ///////////////////////////////////////////////////////////////////
// dtkArrayPrealloc base class
// dtkMathArrayPrealloc base class
// ///////////////////////////////////////////////////////////////////
template <typename T, qlonglong PreallocSize> class dtkArrayPrealloc
template <typename T, qlonglong PreallocSize> class dtkMathArrayPrealloc
{
public:
#if defined(Q_ALIGNOF)
dtkArrayAlignedPrealloc<T, PreallocSize, Q_ALIGNOF(T)> m_prealloc;
dtkMathArrayAlignedPrealloc<T, PreallocSize, Q_ALIGNOF(T)> m_prealloc;
#else
dtkArrayAlignedPrealloc<T, PreallocSize, sizeof(T)> m_prealloc;
dtkMathArrayAlignedPrealloc<T, PreallocSize, sizeof(T)> m_prealloc;
#endif
inline T *prealloc(void)
......@@ -106,7 +106,7 @@ public:
}
};
template <typename T> class dtkArrayPrealloc<T, 0>
template <typename T> class dtkMathArrayPrealloc<T, 0>
{
public:
inline T *prealloc(void) { return 0; }
......@@ -119,10 +119,10 @@ public:
};
// ///////////////////////////////////////////////////////////////////
// dtkArray interface
// dtkMathArray interface
// ///////////////////////////////////////////////////////////////////
template <typename T, qlonglong PreallocSize = 8> class dtkArray : private dtkArrayPrealloc<T, PreallocSize>
template <typename T, qlonglong PreallocSize = 8> class dtkMathArray : private dtkMathArrayPrealloc<T, PreallocSize>
{
public:
enum RawDataType {
......@@ -131,20 +131,20 @@ public:
};
public:
dtkArray(void);
explicit dtkArray(qlonglong arraySize);
dtkArray(qlonglong size, const T& value);
dtkArray(const T *values, qlonglong size);
dtkArray(const dtkArray<T, PreallocSize>& other);
dtkMathArray(void);
explicit dtkMathArray(qlonglong arraySize);
dtkMathArray(qlonglong size, const T& value);
dtkMathArray(const T *values, qlonglong size);
dtkMathArray(const dtkMathArray<T, PreallocSize>& other);
public:
~dtkArray(void);
~dtkMathArray(void);
public:
typedef T *iterator;
typedef const T *const_iterator;
dtkArray<T, PreallocSize>& operator = (const dtkArray<T, PreallocSize>& other);
dtkMathArray<T, PreallocSize>& operator = (const dtkMathArray<T, PreallocSize>& other);
qlonglong size(void) const;
qlonglong count(void) const;
......@@ -172,7 +172,7 @@ public:
void append(const T& value1, const T& value2, const T& value3);
void append(const T& value1, const T& value2, const T& value3, const T& value4);
void append(const T *values, qlonglong count);
void append(const dtkArray<T, PreallocSize>& other);
void append(const dtkMathArray<T, PreallocSize>& other);
void prepend(const T& value);
......@@ -201,14 +201,14 @@ public:
void reserve(qlonglong size);
void squeeze(void);
dtkArray<T, PreallocSize>& fill(const T& fillValue, qlonglong fillCount = -1);
dtkMathArray<T, PreallocSize>& fill(const T& fillValue, qlonglong fillCount = -1);
void reverse(void);
dtkArray<T, PreallocSize> reversed(void) const;
dtkMathArray<T, PreallocSize> reversed(void) const;
dtkArray<T, PreallocSize> mid(qlonglong index, qlonglong length = -1) const;
dtkArray<T, PreallocSize> left(qlonglong length) const;
dtkArray<T, PreallocSize> right(qlonglong length) const;
dtkMathArray<T, PreallocSize> mid(qlonglong index, qlonglong length = -1) const;
dtkMathArray<T, PreallocSize> left(qlonglong length) const;
dtkMathArray<T, PreallocSize> right(qlonglong length) const;
void setRawData(const T *raw_data, qlonglong size, RawDataType data_type = ReadOnly);
......@@ -216,16 +216,16 @@ public:
const T *rawData(void) const;
const T *constRawData(void) const;
static dtkArray<T, PreallocSize> fromRawData(const T *data, qlonglong size);
static dtkArray<T, PreallocSize> fromWritableRawData(T *data, qlonglong size);
static dtkMathArray<T, PreallocSize> fromRawData(const T *data, qlonglong size);
static dtkMathArray<T, PreallocSize> fromWritableRawData(T *data, qlonglong size);
bool operator == (const dtkArray<T, PreallocSize>& other) const;
bool operator != (const dtkArray<T, PreallocSize>& other) const;
bool operator == (const dtkMathArray<T, PreallocSize>& other) const;
bool operator != (const dtkMathArray<T, PreallocSize>& other) const;
dtkArray<T, PreallocSize>& operator += (const T& value);
dtkArray<T, PreallocSize>& operator += (const dtkArray<T, PreallocSize>& other);
dtkArray<T, PreallocSize>& operator << (const T& value);
dtkArray<T, PreallocSize>& operator << (const dtkArray<T, PreallocSize>& other);
dtkMathArray<T, PreallocSize>& operator += (const T& value);
dtkMathArray<T, PreallocSize>& operator += (const dtkMathArray<T, PreallocSize>& other);
dtkMathArray<T, PreallocSize>& operator << (const T& value);
dtkMathArray<T, PreallocSize>& operator << (const dtkMathArray<T, PreallocSize>& other);
typedef iterator Iterator;
typedef const_iterator ConstIterator;
......@@ -292,11 +292,11 @@ private:
inline void initPrealloc(void)
{
m_end = m_start = dtkArrayPrealloc<T, PreallocSize>::prealloc();
m_end = m_start = dtkMathArrayPrealloc<T, PreallocSize>::prealloc();
m_limit = m_start + PreallocSize;
}
dtkArray(const T *data, qlonglong size, bool isWritable);
dtkMathArray(const T *data, qlonglong size, bool isWritable);
void free(T *data, qlonglong count);
void release(void);
......@@ -304,18 +304,18 @@ private:
Data *copyData(const T *src, qlonglong size, qlonglong capacity);
void reallocate(qlonglong capacity);
void detach_helper(void);
void assign(const dtkArray<T, PreallocSize>& other);
void assign(const dtkMathArray<T, PreallocSize>& other);
void grow(qlonglong needed);
void setSize(qlonglong newSize);
};
qlonglong dtkArrayAllocMore(qlonglong alloc, qlonglong extra, qlonglong sizeOfT);
qlonglong dtkMathArrayAllocMore(qlonglong alloc, qlonglong extra, qlonglong sizeOfT);
// ///////////////////////////////////////////////////////////////////
// dtkArray implementation
// dtkMathArray implementation
// ///////////////////////////////////////////////////////////////////
#include "dtkArray.tpp"
#include "dtkMathArray.tpp"
// /////////////////////////////////////////////////////////////////
// Credits
......
......@@ -12,6 +12,7 @@
##
### Code:
add_subdirectory(dtkCore)
add_subdirectory(dtkLog)
add_subdirectory(dtkMeta)
add_subdirectory(dtkMath)
......
### CMakeLists.txt ---
##
## Author: Thibaud Kloczko
## Created: Tue Jul 23 08:35:32 2013 (+0200)
##
######################################################################
##
### Change Log:
##
######################################################################
project(dtkCoreTest)
## #################################################################
## Input
## #################################################################
set(${PROJECT_NAME}_HEADERS_MOC
dtkArrayTest.h)
set(${PROJECT_NAME}_HEADERS
${${PROJECT_NAME}_HEADERS_MOC})
set(${PROJECT_NAME}_SOURCES
dtkArrayTest.cpp)
## ###################################################################
## Input - introspected
## ###################################################################
create_test_sourcelist(
${PROJECT_NAME}_SOURCES_TST
${PROJECT_NAME}.cpp
${${PROJECT_NAME}_SOURCES})
## ###################################################################
## Build rules
## ###################################################################
qt5_add_resources(${PROJECT_NAME}_SOURCES_QRC ${${PROJECT_NAME}_SOURCES_RCC})
add_executable(${PROJECT_NAME}
${${PROJECT_NAME}_SOURCES_QRC}
${${PROJECT_NAME}_SOURCES_TST}
${${PROJECT_NAME}_SOURCES})
## ###################################################################
## Link rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Gui)
qt5_use_modules(${PROJECT_NAME} Test)
target_link_libraries(${PROJECT_NAME} dtkCore)
## ###################################################################
## Test rules
## ###################################################################
add_test(dtkArrayTest ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/dtkCoreTest dtkArrayTest)
......@@ -11,7 +11,7 @@
#include "dtkArrayTest.h"
#include <dtkMath/dtkArray.h>
#include <dtkCore/dtkArray.h>
#include <QtCore>
#include <QtGui>
......@@ -151,13 +151,13 @@ void dtkArrayTestCase::testCreate(void)
QCOMPARE(array.count(), 0LL);
QCOMPARE(array.size(), 0LL);
QCOMPARE(array.capacity(), ExpectedMinCapacity);
QVERIFY(array.constRawData() != 0);
QVERIFY(array.rawData() == array.constRawData());
QVERIFY(((const dtkArray<double> *)&array)->rawData() == array.constRawData());
QVERIFY(array.constData() != 0);
QVERIFY(array.data() == array.constData());
QVERIFY(((const dtkArray<double> *)&array)->data() == array.constData());
// The current constRawData() pointer should be pointing into
// The current constData() pointer should be pointing into
// the middle of "array" at the m_prealloc structure.
const double *d = array.constRawData();
const double *d = array.constData();
QVERIFY(d >= (const double *)&array);
QVERIFY(d < (const double *)((&array) + 1));
......@@ -167,9 +167,9 @@ void dtkArrayTestCase::testCreate(void)
QCOMPARE(array.count(), 1LL);
QCOMPARE(array.size(), 1LL);
QCOMPARE(array.capacity(), ExpectedMinCapacity);
QVERIFY(array.constRawData() != 0);
QVERIFY(array.rawData() == array.constRawData());
QVERIFY(((const dtkArray<double> *)&array)->rawData() == array.constRawData());
QVERIFY(array.constData() != 0);
QVERIFY(array.data() == array.constData());
QVERIFY(((const dtkArray<double> *)&array)->data() == array.constData());
// Create another array that is filled with an initial value.
dtkArray<QVector3D> array2(100, QVector3D(1.0f, 2.0f, 3.0f));
......@@ -177,11 +177,12 @@ void dtkArrayTestCase::testCreate(void)
QCOMPARE(array2.count(), 100LL);
QCOMPARE(array2.size(), 100LL);
QVERIFY(array2.capacity() >= 100LL);
QVERIFY(array2.constRawData() != 0LL);
QVERIFY(array2.rawData() == array2.constRawData());
QVERIFY(((const dtkArray<QVector3D> *)&array2)->rawData() == array2.constRawData());
for (int index = 0; index < 100; ++index)
QVERIFY(array2.constData() != 0LL);
QVERIFY(array2.data() == array2.constData());
QVERIFY(((const dtkArray<QVector3D> *)&array2)->data() == array2.constData());
for (qlonglong index = 0; index < 100; ++index) {
QVERIFY(array2.at(index) == QVector3D(1.0f, 2.0f, 3.0f));
}
// Create a filled array that is within the prealloc area.
dtkArray<double> array3(ExpectedMinCapacity, 42.5f);
......@@ -189,8 +190,8 @@ void dtkArrayTestCase::testCreate(void)
QCOMPARE(array3.count(), ExpectedMinCapacity);
QCOMPARE(array3.size(), ExpectedMinCapacity);
QVERIFY(array3.capacity() == ExpectedMinCapacity);
QVERIFY(array3.constRawData() != 0);
QVERIFY(array3.rawData() == array3.constRawData());
QVERIFY(array3.constData() != 0);
QVERIFY(array3.data() == array3.constData());
for (int index = 0; index < ExpectedMinCapacity; ++index)
QVERIFY(array3.at(index) == 42.5f);
......@@ -225,31 +226,31 @@ void dtkArrayTestCase::testCreate(void)
QCOMPARE(ComplexValue::destroyCount, 6);
}
// void dtkArrayTestCase::testAppend(void)
// {
// dtkArray<double> array;
// int index;
void dtkArrayTestCase::testAppend(void)
{
dtkArray<double> array;
int index;
// // Appending up to the minimum capacity should not cause a realloc.
// const double *d = array.constRawData();
// for (index = 0; index < ExpectedMinCapacity; ++index) {
// array.append(double(index));
// QVERIFY(array.constRawData() == d);
// }
// Appending up to the minimum capacity should not cause a realloc.
const double *d = array.constData();
for (index = 0; index < ExpectedMinCapacity; ++index) {
array.append(double(index));
QVERIFY(array.constData() == d);
}
// // Check that the array contains the values we expected.
// QCOMPARE(array.count(), ExpectedMinCapacity);
// QCOMPARE(array.capacity(), ExpectedMinCapacity);
// for (index = 0; index < ExpectedMinCapacity; ++index) {
// QCOMPARE(array[index], double(index));
// }
// Check that the array contains the values we expected.
QCOMPARE(array.count(), ExpectedMinCapacity);
QCOMPARE(array.capacity(), ExpectedMinCapacity);
for (index = 0; index < ExpectedMinCapacity; ++index) {
QCOMPARE(array[index], double(index));
}
// // Append 1 more item and check for realloc.
// array += double(1000.0);
// QCOMPARE(array.count(), ExpectedMinCapacity + 1);
// QVERIFY(array.capacity() > ExpectedMinCapacity);
// QVERIFY(array.capacity() >= array.count());
// QCOMPARE(array.size(), array.count());
// Append 1 more item and check for realloc.
array += double(1000.0);
QCOMPARE(array.count(), ExpectedMinCapacity + 1);
QVERIFY(array.capacity() > ExpectedMinCapacity);
QVERIFY(array.capacity() >= array.count());
QCOMPARE(array.size(), array.count());
// // Check that the array still contains the values we expected.
// for (index = 0; index < ExpectedMinCapacity; ++index) {
......@@ -280,9 +281,9 @@ void dtkArrayTestCase::testCreate(void)
// QVERIFY(array3.capacity() >= array3.size());
// // Check that we actually are sharing the data between the copies.
// QVERIFY(array.constRawData() == array2.constRawData());
// QVERIFY(array.constRawData() == array3.constRawData());
// d = array2.constRawData();
// QVERIFY(array.constData() == array2.constData());
// QVERIFY(array.constData() == array3.constData());
// d = array2.constData();
// // Add another item to the original and check that the copy is unchanged.
// array << double(1500.0);
......@@ -292,10 +293,10 @@ void dtkArrayTestCase::testCreate(void)
// QCOMPARE(array3.count(), ExpectedMinCapacity + 1 + 1000);
// // Check that we have detached the first array (copy-on-write).
// QVERIFY(array.constRawData() != array2.constRawData());
// QVERIFY(array.constRawData() != array3.constRawData());
// QVERIFY(array2.constRawData() == array3.constRawData());
// QVERIFY(array2.constRawData() == d);
// QVERIFY(array.constData() != array2.constData());
// QVERIFY(array.constData() != array3.constData());
// QVERIFY(array2.constData() == array3.constData());
// QVERIFY(array2.constData() == d);
// // Check that the original and the copy contain the right values.
// for (index = 0; index < ExpectedMinCapacity; ++index) {
......@@ -317,7 +318,7 @@ void dtkArrayTestCase::testCreate(void)
// array3.append(1.0);
// QVERIFY(array3.isDetached());
// QVERIFY(!array2.isDetached()); // Still thinks it is shared.
// array2.rawData();
// array2.data();
// QVERIFY(array2.isDetached()); // Now knows that it isn't.
// // Create a large array of strings.
......@@ -420,15 +421,15 @@ void dtkArrayTestCase::testCreate(void)
// // Copy the same object over itself.
// dtkArray<ComplexValue> array9(array8);
// QVERIFY(array9.constRawData() == array8.constRawData());
// QVERIFY(array9.constData() == array8.constData());
// for (index = 0; index < array8.size(); ++index)
// QCOMPARE((*((const dtkArray<ComplexValue> *)&array9))[index],
// array8.at(index));
// array9 = array8;
// QVERIFY(array9.constRawData() == array8.constRawData());
// QVERIFY(array9.constData() == array8.constData());
// for (index = 0; index < array8.size(); ++index)
// QCOMPARE(array9.at(index), array8.at(index));
// }
}
// void dtkArrayTestCase::testAppendTwoAtATime(void)
// {
......@@ -600,7 +601,7 @@ void dtkArrayTestCase::testCreate(void)
// array2 += (dtkArray<double>());
// QCOMPARE(array2.count(), 2000);
// dtkArray<double> array3(array2.constRawData(), array2.size());
// dtkArray<double> array3(array2.constData(), array2.size());
// QCOMPARE(array3.size(), array2.size());
// for (index = 0; index < array2.size(); ++index)
// QCOMPARE(array3.at(index), array2.at(index));
......@@ -659,7 +660,7 @@ void dtkArrayTestCase::testCreate(void)
// array2.append(1000 - index);
// }
// array.replace(500, array2.constRawData(), 500);
// array.replace(500, array2.constData(), 500);