framework/delibs/debase/deRandom.c \
framework/delibs/debase/deString.c \
framework/delibs/decpp/deArrayBuffer.cpp \
+ framework/delibs/decpp/deArrayUtil.cpp \
framework/delibs/decpp/deBlockBuffer.cpp \
framework/delibs/decpp/deCommandLine.cpp \
framework/delibs/decpp/deDefs.cpp \
#include "tcuFloat.hpp"
#include "tcuTextureUtil.hpp"
#include "deStringUtil.hpp"
+#include "deArrayUtil.hpp"
#include <limits>
endif ()
set(DECPP_SRCS
+ deArrayBuffer.cpp
+ deArrayBuffer.hpp
+ deArrayUtil.cpp
+ deArrayUtil.hpp
deBlockBuffer.cpp
deBlockBuffer.hpp
deCommandLine.cpp
deThreadSafeRingBuffer.hpp
deUniquePtr.cpp
deUniquePtr.hpp
- deArrayBuffer.cpp
- deArrayBuffer.hpp
)
add_library(decpp STATIC ${DECPP_SRCS})
--- /dev/null
+/*-------------------------------------------------------------------------
+ * drawElements C++ Base Library
+ * -----------------------------
+ *
+ * Copyright 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *//*!
+ * \file
+ * \brief Array utils
+ *//*--------------------------------------------------------------------*/
+
+#include "deArrayUtil.hpp"
+
+DE_EMPTY_CPP_FILE
--- /dev/null
+#ifndef _DEARRAYUTIL_HPP
+#define _DEARRAYUTIL_HPP
+/*-------------------------------------------------------------------------
+ * drawElements C++ Base Library
+ * -----------------------------
+ *
+ * Copyright 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *//*!
+ * \file
+ * \brief Array utils
+ *//*--------------------------------------------------------------------*/
+
+#include "deDefs.hpp"
+
+namespace de
+{
+
+//! Get an element of an array with a specified size.
+template <int LastElementIndex, int Size, typename Elem>
+const Elem& getSizedArrayElement (const Elem (&array)[Size], typename de::EnableIf<int, LastElementIndex==Size>::Type offset)
+{
+ DE_ASSERT(inBounds(offset, 0, Size));
+ return array[offset];
+}
+
+//! Get an element of an array with a compile-time constant size.
+template <int Size, typename Elem>
+const Elem& getArrayElement (const Elem (&array)[Size], int offset)
+{
+ DE_ASSERT(inBounds(offset, 0, Size));
+ return array[offset];
+}
+
+} // de
+
+#endif // _DEARRAYUTIL_HPP
{
};
-
template <typename T>
struct EnableIf<T, true>
{
typedef T Type;
};
-//! Get an element of an array with a specified size.
-template <int LastElementIndex, int Size, typename Elem>
-const Elem& getSizedArrayElement (const Elem (&array)[Size], typename de::EnableIf<int, LastElementIndex==Size>::Type offset)
-{
- DE_ASSERT(inBounds(offset, 0, Size));
- return array[offset];
-}
-
-//! Get an element of an array with a compile-time constant size.
-template <int Size, typename Elem>
-const Elem& getArrayElement (const Elem (&array)[Size], int offset)
-{
- DE_ASSERT(inBounds(offset, 0, Size));
- return array[offset];
-}
-
} // de
/*--------------------------------------------------------------------*//*!
#include "gluStrUtil.hpp"
#include "glwFunctions.hpp"
#include "glwEnums.hpp"
+#include "deArrayUtil.hpp"
#include <sstream>
#include "gluShaderUtil.hpp"
#include "glwEnums.hpp"
+#include "deArrayUtil.hpp"
namespace glu
{
#include "tcuResource.hpp"
#include "gluRenderContext.hpp"
#include "gluContextInfo.hpp"
+#include "deArrayBuffer.hpp"
#include <vector>
#include <string>
#include "gluVarType.hpp"
#include "deStringUtil.hpp"
+#include "deArrayUtil.hpp"
namespace glu
{
#include "deRandom.hpp"
#include "deStringUtil.hpp"
#include "deUniquePtr.hpp"
+#include "deArrayUtil.hpp"
#include <map>
#include <string>
#include "tcuVectorUtil.hpp"
#include "deRandom.hpp"
+#include "deArrayUtil.hpp"
#include "deStringUtil.hpp"
#include "deUniquePtr.hpp"
#include "deSharedPtr.hpp"
#include "deUniquePtr.hpp"
#include "deSTLUtil.hpp"
+#include "deArrayUtil.hpp"
#include <set>
#include <map>
#include "deRandom.hpp"
#include "deMath.h"
#include "deString.h"
+#include "deArrayUtil.hpp"
namespace deqp
{
#include "tcuVectorUtil.hpp"
#include "tcuFormatUtil.hpp"
#include "deRandom.hpp"
+#include "deArrayUtil.hpp"
#include "glwFunctions.hpp"
#include "glwEnums.hpp"
#include "gluShaderProgram.hpp"
#include "deMemory.h"
#include "deStringUtil.hpp"
+#include "deArrayUtil.hpp"
#include <algorithm>
#include "deStringUtil.hpp"
#include "deUniquePtr.hpp"
#include "deSharedPtr.hpp"
+#include "deArrayUtil.hpp"
#include "tcuCommandLine.hpp"
#include "tcuFloatFormat.hpp"
#include "deStringUtil.hpp"
#include "deFloat16.h"
#include "deUniquePtr.hpp"
+#include "deArrayUtil.hpp"
#include "tcuTestLog.hpp"
#include "tcuPixelFormat.hpp"
#include "deMath.h"
#include "deStringUtil.hpp"
+#include "deArrayUtil.hpp"
#include <cstring>
#include <cmath>
#include "rrRenderer.hpp"
#include "tcuTextureUtil.hpp"
#include "tcuVectorUtil.hpp"
-#include "deRandom.hpp"
#include "tcuFloat.hpp"
+#include "deRandom.hpp"
+#include "deArrayUtil.hpp"
+
namespace dit
{