<pre style='margin:0'>
Marcus Calhoun-Lopez (MarcusCalhoun-Lopez) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/7d96e074134e268dc8ef1e4d704b68836bcab445">https://github.com/macports/macports-ports/commit/7d96e074134e268dc8ef1e4d704b68836bcab445</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 7d96e07 icet: new port
</span>7d96e07 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 7d96e074134e268dc8ef1e4d704b68836bcab445
</span>Author: Marcus Calhoun-Lopez <mcalhoun@macports.org>
AuthorDate: Sun Jul 21 18:18:54 2019 -0700
<span style='display:block; white-space:pre;color:#404040;'> icet: new port
</span>---
graphics/icet/Portfile | 45 +
graphics/icet/files/patch-cmake_location.diff | 40 +
graphics/icet/files/patch-libraries.diff | 10 +
graphics/icet/files/patch-upstream.diff | 11426 ++++++++++++++++++++++++
4 files changed, 11521 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/icet/Portfile b/graphics/icet/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..be25778
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/icet/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,45 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup cmake 1.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup mpi 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+name icet
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 2.1.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories graphics
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license BSD
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platforms darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description a high-performance sort-last parallel rendering library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description The Image Composition Engine for Tiles (IceT) is ${description}.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage https://icet.sandia.gov/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+master_sites https://icet.sandia.gov/_assets/files/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+distname IceT-[join [split ${version} .] -]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 dcbadc1f66fd6afd71c4474b576e70cfbe5e650d \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 6eaf0442bf6832ce6c8a50805cf9279894fbcd5886cf6ea214b09d24f111fa33 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 170423
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+mpi.setup require
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# apply upstream patches to accommodate ParaView
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# install CMake files in correct location
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# allow ParaView to find libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-upstream.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-cmake_location.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-libraries.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|__MACPORTS_PREFIX__|${prefix}|g" ${worksrcpath}/cmake/IceTConfig.cmake.in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append -DBUILD_SHARED_LIBS=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DGLUT_glut_LIBRARY=/System/Library/Frameworks/GLUT.framework
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.type regex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.url ${homepage}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.regex "IceT ((\\d+(?:\\.\\d+)*)) Released"
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/icet/files/patch-cmake_location.diff b/graphics/icet/files/patch-cmake_location.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..28af542
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/icet/files/patch-cmake_location.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,40 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- CMakeLists.txt.orig 2014-11-05 07:41:52.000000000 -0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ CMakeLists.txt 2019-06-28 19:00:43.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -260,7 +260,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IF (NOT ICET_INSTALL_NO_DEVELOPMENT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ INSTALL(EXPORT ${ICET_INSTALL_EXPORT_NAME}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- DESTINATION ${ICET_INSTALL_LIB_DIR}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ DESTINATION ${ICET_INSTALL_LIB_DIR}/cmake/IceT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ENDIF (NOT ICET_INSTALL_NO_DEVELOPMENT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ENDIF(NOT ICET_INSTALL_NO_LIBRARIES)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -315,7 +315,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${ICET_LIBRARY_DIR}/IceTConfig.cmake.install
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ @ONLY IMMEDIATE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ INSTALL(FILES ${ICET_LIBRARY_DIR}/IceTConfig.cmake.install
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- DESTINATION ${ICET_INSTALL_LIB_DIR}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ DESTINATION ${ICET_INSTALL_LIB_DIR}/cmake/IceT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ RENAME IceTConfig.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ENDIF (NOT ICET_INSTALL_NO_DEVELOPMENT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -328,7 +328,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IF (NOT ICET_INSTALL_NO_DEVELOPMENT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ INSTALL(FILES ${ICET_LIBRARY_DIR}/IceTConfigVersion.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- DESTINATION ${ICET_INSTALL_LIB_DIR}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ DESTINATION ${ICET_INSTALL_LIB_DIR}/cmake/IceT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ENDIF (NOT ICET_INSTALL_NO_DEVELOPMENT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- cmake/IceTConfig.cmake.in.orig 2014-11-05 07:41:52.000000000 -0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ cmake/IceTConfig.cmake.in 2019-06-28 19:01:33.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -14,7 +14,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # This file should be installed in the lib directory. Find the root directory.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ GET_FILENAME_COMPONENT(_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-GET_FILENAME_COMPONENT(_install_dir "${_dir}/.." ABSOLUTE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++GET_FILENAME_COMPONENT(_install_dir "${_dir}/../../.." ABSOLUTE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Load the targets include (next to this one).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ INCLUDE("${_dir}/IceTTargets.cmake")
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/icet/files/patch-libraries.diff b/graphics/icet/files/patch-libraries.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..825e2c4
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/icet/files/patch-libraries.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- cmake/IceTConfig.cmake.in.orig 2014-11-05 08:41:52.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ cmake/IceTConfig.cmake.in 2019-07-15 16:53:06.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -37,6 +37,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(ICET_CORE_LIBS "@ICET_CORE_LIBRARY_TARGET@")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(ICET_GL_LIBS "@ICET_GL_LIBRARY_TARGET@")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(ICET_MPI_LIBS "@ICET_MPI_LIBRARY_TARGET@")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++SET(ICET_LIBRARIES "__MACPORTS_PREFIX__/lib/lib${ICET_CORE_LIBS}.dylib;__MACPORTS_PREFIX__/lib/lib${ICET_GL_LIBS}.dylib;__MACPORTS_PREFIX__/lib/lib${ICET_MPI_LIBS}.dylib")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # MPI configuration used to build IceT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(ICET_MPI_INCLUDE_PATH "@MPI_INCLUDE_PATH@")
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/icet/files/patch-upstream.diff b/graphics/icet/files/patch-upstream.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..0806b39
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/icet/files/patch-upstream.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,11426 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git CMakeLists.txt CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 55dac92..79cf92e 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -5,7 +5,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ## This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Turn off policy 0017, which makes modules packaged with CMake find
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # any module rather than just others packaged with CMake. This is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -18,10 +18,16 @@ PROJECT(ICET C)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Set the current IceT version.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(ICET_MAJOR_VERSION 2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-SET(ICET_MINOR_VERSION 1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-SET(ICET_PATCH_VERSION 1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++SET(ICET_MINOR_VERSION 2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++SET(ICET_PATCH_VERSION 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(ICET_VERSION "${ICET_MAJOR_VERSION}.${ICET_MINOR_VERSION}.${ICET_PATCH_VERSION}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# CMake 2.8.12 and later supports an rpath mechanism on Mac OSX that allows
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# build and install targets to point to dependent libraries that are not
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# dependent on DYLD_LIBRARY_PATH. This variable turns that behavior on by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# default and also suppresses CMake policy warning 0042.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++SET(CMAKE_MACOSX_RPATH ON)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Set output paths.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(LIBRARY_OUTPUT_PATH ${ICET_BINARY_DIR}/lib CACHE PATH
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "Output directory for building all libraries.")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -30,14 +36,6 @@ SET(EXECUTABLE_OUTPUT_PATH ${ICET_BINARY_DIR}/bin CACHE PATH
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(ICET_LIBRARY_DIR ${LIBRARY_OUTPUT_PATH})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(ICET_EXECUTABLE_DIR ${EXECUTABLE_OUTPUT_PATH})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-SET(C_TEST_PATH ${EXECUTABLE_OUTPUT_PATH})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# CMAKE_CONFIGURATION_TYPES is set for generators that support multiple
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# configurations e.g. Visual Studio. In that case we update the C_TEST_PATH to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# include the configuration type (CTEST_CONFIGURATION_TYPE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-IF (CMAKE_CONFIGURATION_TYPES)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- SET (C_TEST_PATH ${C_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-ENDIF(CMAKE_CONFIGURATION_TYPES)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(CMAKE_MODULE_PATH
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${CMAKE_MODULE_PATH}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -50,6 +48,8 @@ SET(ICET_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Options controlling support libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ OPTION(ICET_USE_OPENGL "Build OpenGL support layer for IceT." ON)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++OPTION(ICET_USE_OSMESA "Use OffScreen Mesa" OFF)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++OPTION(ICET_USE_OFFSCREEN_EGL "Use OffScreen rendering through EGL" OFF)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ OPTION(ICET_USE_MPI "Build MPI communication layer for IceT." ON)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Option to set the preferred K value to use in the radix-k algorithm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -98,19 +98,19 @@ ENDIF (UNIX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Configure OpenGL support.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IF (ICET_USE_OPENGL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- FIND_PACKAGE(OpenGL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IF (OPENGL_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IF (ICET_USE_OSMESA)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ FIND_PACKAGE(OSMesa REQUIRED)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ INCLUDE_DIRECTORIES(${OSMESA_INCLUDE_DIR})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SET(ICET_OPENGL_LIBRARIES ${OSMESA_LIBRARY})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ELSEIF (ICET_USE_OFFSCREEN_EGL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ FIND_PACKAGE(EGL REQUIRED)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ INCLUDE_DIRECTORIES(${EGL_INCLUDE_DIR})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SET(ICET_OPENGL_LIBRARIES ${EGL_LIBRARIES})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ELSE()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ FIND_PACKAGE(OpenGL REQUIRED)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(ICET_OPENGL_LIBRARIES ${OPENGL_LIBRARIES})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ELSE (OPENGL_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- FIND_PACKAGE(OSMesa)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IF (OSMESA_INCLUDE_DIR AND OSMESA_LIBRARY)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- INCLUDE_DIRECTORIES(${OSMESA_INCLUDE_DIR})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- SET(ICET_OPENGL_LIBRARIES ${OSMESA_LIBRARY})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ELSE(OSMESA_INCLUDE_DIR AND OSMESA_LIBRARY)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- MESSAGE(SEND_ERROR "Could not find OpenGL or OSMesa, which is required when ICET_USE_OPENGL is ON.")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ENDIF (OSMESA_INCLUDE_DIR AND OSMESA_LIBRARY)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ENDIF (OPENGL_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ENDIF()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ENDIF (ICET_USE_OPENGL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Configure MPI support.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -169,9 +169,13 @@ ENDIF (ICET_USE_MPI)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Add extra warnings when possible. The IceT build should be clean. I expect
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # no warnings when bulding this code.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-IF (CMAKE_COMPILER_IS_GNUCC)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- SET(ICET_C_FLAGS_WARN "-ansi -Wall -Wno-long-long -Wcast-align -Wextra -Wformat-security -Wshadow -Wunused -Wreturn-type -Wpointer-arith -Wdeclaration-after-statement")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-ENDIF (CMAKE_COMPILER_IS_GNUCC)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IF(CMAKE_C_COMPILER_ID STREQUAL "Clang")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SET(CMAKE_COMPILER_IS_CLANG 1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ENDIF()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SET(ICET_C_FLAGS_WARN "-ansi -Wall -Wno-long-long -Wextra -Wformat-security -Wshadow -Wunused -Wreturn-type -Wpointer-arith -Wdeclaration-after-statement")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ENDIF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Configure testing support.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IF (BUILD_TESTING)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -329,7 +333,7 @@ IF (NOT ICET_INSTALL_NO_DEVELOPMENT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ENDIF (NOT ICET_INSTALL_NO_DEVELOPMENT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Enable CPack packaging.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-SET(CPACK_PACKAGE_DESCRIPTION_FILE ${ICET_SOURCE_DIR}/README)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++SET(CPACK_PACKAGE_DESCRIPTION_FILE ${ICET_SOURCE_DIR}/README.md)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Image Composition Engine for Tiles")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(CPACK_PACKAGE_NAME "IceT")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(CPACK_PACKAGE_VENDOR "Sandia National Laboratories")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git History History
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 928c24e..a921f95 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- History
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ History
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,25 +10,29 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ **
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *****************************************************************************
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Revision 2.2:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Added the icetCompositeImage function to allow IceT to operate on
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pre-rendered images rather than rely on a rendering callback.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Revision 2.1:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Added Radix-k as a single-image strategy.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Added Radix-k as a single-image strategy.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Changed the collection method for single image compositing to use
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- the built-in gather functions of MPI. The old method had memory
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- problems with large numbers of processes and would probably be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- inefficient anyway.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Changed the collection method for single image compositing to use
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ the built-in gather functions of MPI. The old method had memory
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ problems with large numbers of processes and would probably be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ inefficient anyway.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Changed the single image compositing methods to work strictly with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- compressed images. This prevents having to pad images with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- background only to then test that same background later during
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- compression.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Changed the single image compositing methods to work strictly with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ compressed images. This prevents having to pad images with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ background only to then test that same background later during
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ compression.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Added interlace images option that provides a hint to the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- compositing algorithms to try shuffling the pixels in images to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- better load balance the active pixels during compositing.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Added interlace images option that provides a hint to the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ compositing algorithms to try shuffling the pixels in images to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ better load balance the active pixels during compositing.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Patch 1: Fixed compatibility issue with compiling against MPI
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- version 1. Fixed build issues for Windows.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Patch 1: Fixed compatibility issue with compiling against MPI
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ version 1. Fixed build issues for Windows.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Revision 2.0: A major restructuring of the IceT code comprising the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ following changes:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git README README
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+deleted file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 123107e..0000000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- README
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,33 +0,0 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-** -*- text -*- *************************************************************
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-**
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-** README and installation instructions for IceT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-**
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-** Author: Kenneth Moreland (kmorel@sandia.gov)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-**
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-** Copyright 2003 Sandia Coporation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-** Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-** the U.S. Government retains certain rights in this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-**
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-** This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-**
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-*****************************************************************************
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Welcome to the IceT build process. IceT uses CMake to automatically
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-tailor itself to your system, so compiling should be relatively painless.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Before building IceT you will need to install CMake on your system. You
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-can get CMake from www.cmake.org.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Once CMake is installed and the IceT source is extracted, run the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-interactive CMake configuration tool. On UNIX, run ccmake. On Win32, run
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the CMake program on the desktop or in the start menu. Note that when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-using the interactive configuration tool, you will need to ``configure''
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-several times before you can generate the build files. This is because as
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-more information is retrieved, futher options are revealed.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-After CMake generates build files, compile the applications as applicable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-for your system.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-IceT is released under the New BSD License. Any contributions to IceT will
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-also be considered to fall under this license, and it is the responsibility
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-of the authors to secure the necessary permissions before contributing.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git README.md README.md
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+new file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0000000..bbb3afa
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ README.md
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,37 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++> *****************************************************************************
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++> README and installation instructions for IceT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++> Author: Kenneth Moreland (kmorel@sandia.gov)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++> Copyright 2003 Sandia Coporation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++> Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++> the U.S. Government retains certain rights in this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++> This source code is released under the [New BSD License](bsd).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++> *****************************************************************************
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Welcome to the IceT build process. IceT uses [CMake](cmake) to automatically
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++tailor itself to your system, so compiling should be relatively painless.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Before building IceT you will need to install CMake on your system. You
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++can get CMake from [here](cmake-download).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Once CMake is installed and the IceT source is extracted, run the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++interactive CMake configuration tool. On UNIX, run `ccmake`. On Win32, run
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the CMake program on the desktop or in the start menu. Note that when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++using the interactive configuration tool, you will need to *configure*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++several times before you can generate the build files. This is because as
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++more information is retrieved, futher options are revealed.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++After CMake generates build files, compile the applications as applicable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++for your system.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IceT is released under the [New BSD License](bsd). Any contributions to IceT will
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++also be considered to fall under this license, and it is the responsibility
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++of the authors to secure the necessary permissions before contributing.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++[bsd]: http://opensource.org/licenses/BSD-3-Clause
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++[cmake]: http://www.cmake.org/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++[cmake-download]: http://www.cmake.org/download/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetAddTile.3 doc/man/man3/icetAddTile.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index e2c921d..e3302e7 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetAddTile.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetAddTile.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:53 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:52 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetBoundingBox.3 doc/man/man3/icetBoundingBox.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 4843e4d..7fdd198 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetBoundingBox.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetBoundingBox.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:53 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:52 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetBoundingBoxd.3 doc/man/man3/icetBoundingBoxd.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 4843e4d..7fdd198 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetBoundingBoxd.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetBoundingBoxd.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:53 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:52 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetBoundingBoxf.3 doc/man/man3/icetBoundingBoxf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 4843e4d..7fdd198 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetBoundingBoxf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetBoundingBoxf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:53 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:52 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetBoundingVertices.3 doc/man/man3/icetBoundingVertices.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index edd1f77..c902139 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetBoundingVertices.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetBoundingVertices.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:52 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetCompositeImage.3 doc/man/man3/icetCompositeImage.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+new file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0000000..69dea97
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetCompositeImage.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,290 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++'\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Thu Oct 9 15:41:59 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.nf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.de Ve
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.ft R
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetCompositeImage" "3" "October 9, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage \-\- composites a pre\-rendered image\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.SH Synopsis
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceT.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TS H
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++l l l .
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBIceTImage\fP \fBicetCompositeImage\fP(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTVoid * \fIcolor_buffer\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTVoid * \fIdepth_buffer\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt * \fIvalid_pixels_viewport\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTDouble * \fIprojection_matrix\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTDouble * \fImodelview_matrix\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTFloat * \fIbackground_color\fP );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.SH Description
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++The \fBicetCompositeImage\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++function takes image buffer data and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++composites it to a single image. This function behaves similarly to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++except that instead of using callback functions to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++render and retrieve image data, the images are pre\-rendered and passed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++directly to \fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Although it is more efficient to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++allow \fBIceT \fPto determine rendering projections and use callbacks, it is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++often more convenient for applications to integrate \fBIceT \fPas a separate
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++compositing step after the rendering.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Before \fBIceT \fPmay composite an image, the display needs to be defined
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(using \fBicetAddTile\fP),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the buffer formats need to be specified
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(using \fBicetSetColorFormat\fPand \fBicetSetDepthFormat\fP),and the composite
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++strategy must be set (using \fBicetStrategy\fP).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++The single image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++sub\-strategy may also optionally be set (using
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetSingleImageStrategy\fP).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++All process must call \fBicetCompositeImage\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++for the operation to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++complete on any process in a parallel job.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++The \fIcolor_buffer\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and \fIdepth_buffer\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++arguments point to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++memory buffers that contain the image data. The image data is always
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++stored in densely packed arrays in row\-major order (a.k.a. x\-major order
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or by scan\-lines). The first horizontal scan\-line is at the bottom of the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++image with subsequent scan\-lines moving up. The size of each image buffer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is expected to be the width and the height of the global viewport (which
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is set indirectly with \fBicetAddTile\fP).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++The global viewport is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++stored in the \fBICET_GLOBAL_VIEWPORT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++state variable. If only one
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++tile is specified, then the width and height of the global viewport will
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++be the same as this one tile.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++The format for \fIcolor_buffer\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is expected to be the same as what is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++set with \fBicetSetColorFormat\fP\&.The following formats and their
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++interpretations with respect to \fIcolor_buffer\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++are as follows.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_IMAGE_COLOR_RGBA_UBYTE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Each entry is an RGBA
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++color tuple. Each component is valued in the range from 0 to 255
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and is stored as an 8\-bit integer. The buffer will always be allocated
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++on memory boundaries such that each color value can be treated as a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++single 32\-bit integer.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_IMAGE_COLOR_RGBA_FLOAT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Each entry is an RGBA
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++color tuple. Each component is in the range from 0.0 to 1.0 and is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++stored as a 32\-bit float.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_IMAGE_COLOR_NONE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ No color values are stored in the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++image.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Likewise, the format for \fIdepth_buffer\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is expected to be the same
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++as what is set with \fBicetSetDepthFormat\fP\&.The following formats and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++their interpretations with respect to \fIdepth_buffer\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++are as
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++follows.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_IMAGE_DEPTH_FLOAT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Each entry is in the range from
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++0.0 (near plane) to 1.0 (far plane) and is stored as a 32\-bit
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++float.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_IMAGE_DEPTH_NONE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ No depth values are stored in the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++image.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++If the current format does not have a color or depth, then the respective
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++buffer argument should be set to NULL\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Care should be taken to make sure that the color and depth buffer formats
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++are consistent to the formats expected by \fBIceT \fP\&.Mismatched formats will
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++result in garbage images and possible memory faults.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Also note that when compositing with color blending
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(\fBicetCompositeMode\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is set to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_COMPOSITE_MODE_BLEND\fP),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the color buffer must be rendered
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++with a black background in order for the composite to complete
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++correctly. A colored background can later be added using the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIbackground_color\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++as described below.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIvalid_pixels_viewport\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is an optional argument that makes it
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++possible to specify a subset of pixels that are valid. In parallel
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++rendering it is common for a single process to render geometry in only a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++small portion of the image, and \fBIceT \fPcan take advantage of this
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++information. If the rendering system identifies such a region, it can be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++specified with \fIvalid_pixels_viewport\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Like all viewports in \fBIceT \fP,\fIvalid_pixels_viewport\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is an array
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++of 4 integers in the form $<x, y, width, height >$.This
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++viewport is given in relation to the image passed in the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIcolor_buffer\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and \fIdepth_buffer\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++arguments. Everything
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++outside of this rectangular region will be ignored. For example, if the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIvalid_pixels_viewport\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$<10, 20, 150, 100 >$is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++given, then \fBicetCompositeImage\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++will ignore all pixels in the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++bottom 10 rows, the left 20 columns, anything above the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$160^th$
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(10+150) row, and anything to the right of the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$120^th$
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(20+100) column.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++If \fIvalid_pixels_viewport\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is NULL,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++then all pixels in the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++input image are assumed to be valid.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIprojection_matrix\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and \fImodelview_matrix\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++are optional
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++arguments that specify the projection that was used during rendering.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++When applied to the geometry bounds information given with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetBoundingBox\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetBoundingVertices\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++this provides
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBIceT \fPwith further information on local image projections. If the given
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++matrices are not the same used in the rendering or the given bounds do
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++not contain the geometry, \fBIceT \fPmay clip the geometry in surprising ways.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++If these arguments are set to NULL,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++then geometry projection will
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++not be considered when determining what parts of images are valid.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++The \fIbackground_color\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++argument specifies the desired background
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++color for the image. It is given as an array of 4 floating point values
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++specifying, in order, the red, green, blue, and alpha channels of the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++color in the range from 0.0 to 1.0\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++When rendering using a depth buffer, the background color is used to fill
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++in empty regions of images. When rendering using color blending, the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++background color is used to correct colored backgrounds.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++As stated previously, color blended compositing only works correctly if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the images are rendered with a clear black background. Otherwise the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++background color will be added multiple times by each process that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++contains geometry in that pixel. If the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_CORRECT_COLORED_BACKGROUND\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++feature is enabled, this
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++background color is blended back into the final composited image.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.SH Return Value
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++On each .igdisplay processdisplay
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++process (as defined by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetAddTile\fP),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++returns the fully
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++composited image in an \fBIceTImage\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++object. The contents of the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++image are undefined for any non\-display process.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++If the \fBICET_COMPOSITE_ONE_BUFFER\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++option is on and both a color
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and depth buffer is specified with \fBicetSetColorFormat\fPand
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetSetDepthFormat\fP,then the returned image might be missing the depth
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++buffer. The rational behind this option is that often both the color and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++depth buffer is necessary in order to composite the color buffer, but the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++composited depth buffer is not needed. In this case, the compositing
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++might save some time by not transferring depth information at the latter
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++stage of compositing.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++The returned image uses memory buffers that will be reclaimed the next
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++time \fBIceT \fPrenders or composites a frame. Do not use this image after
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the next call to \fBicetCompositeImage\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(unless you have changed the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBIceT \fPcontext).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.SH Errors
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_INVALID_VALUE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ An argument is set to NULL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++where data is required.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_OUT_OF_MEMORY\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Not enough memory left to hold intermittent frame buffers and other
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++temporary data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++may also indirectly raise an error if there is an
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++issue with the strategy or callback.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.SH Warnings
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_INVALID_VALUE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ An argument to \fBicetCompositeImage\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is inconsistent with the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++current \fBIceT \fPstate.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.SH Bugs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++The images provided must match the format expected by \fBIceT \fPor else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++unpredictable behavior may occur. The images must also be carefully
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++rendered to follow the provided viewport and projections. Images that a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++color blended must be rendered with a black background and rendered with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the correct alpha value.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++If compositing with color blending on, the image returned may have a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++black background instead of the \fIbackground_color\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++requested. This
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++can be corrected by blending the returned image over the desired
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++background. This will be done for you if the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_CORRECT_COLORED_BACKGROUND\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++feature is enabled.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.SH Copyright
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Copyright (C)2014 Sandia Corporation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Under the terms of Contract DE\-AC04\-94AL85000 with Sandia Corporation, the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++U.S. Government retains certain rights in this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.SH See Also
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIicetAddTile\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIicetBoundingBox\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIicetBoundingVertices\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIicetDrawCallback\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIicetDrawFrame\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIicetSetColorFormat\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIicetSetDepthFormat\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIicetSingleImageStrategy\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIicetStrategy\fP(3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetCompositeMode.3 doc/man/man3/icetCompositeMode.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 4a38471..0b15af6 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetCompositeMode.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetCompositeMode.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Fri Sep 26 14:31:02 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.TH "icetCompositeMode" "3" "August 9, 2010" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetCompositeMode" "3" "September 26, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetCompositeMode \-\- set the type of operation used for compositing\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -91,11 +91,11 @@ None.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetCompositeMode\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ will let you set a mode even if it is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ incompatible with other current settings. Some settings will be checked
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-during a call to \fBicetDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-For example, if the image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-format (specified with \fBicetSetColorFormat\fPand \fBicetSetDepthFormat\fP)does
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-not support the composite mode picked, you will get an error during the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-call to \fBicetDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++during a call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++For example, if the image format (specified with \fBicetSetColorFormat\fPand
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetSetDepthFormat\fP)does not support the composite mode picked, you will
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++get an error during the call to \fBicetDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Other incompatibilities are also not checked. For example, if the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ composite mode is set to \fBICET_COMPOSITE_MODE_BLEND\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetCompositeOrder.3 doc/man/man3/icetCompositeOrder.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index b547396..1261570 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetCompositeOrder.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetCompositeOrder.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:52 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetCopyState.3 doc/man/man3/icetCopyState.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 6319602..22a3f82 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetCopyState.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetCopyState.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:52 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetCreateContext.3 doc/man/man3/icetCreateContext.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0dfbfbc..c183dba 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetCreateContext.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetCreateContext.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:52 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetCreateMPICommunicator.3 doc/man/man3/icetCreateMPICommunicator.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index b0c470b..3863b63 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetCreateMPICommunicator.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetCreateMPICommunicator.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:53 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetDataReplicationGroup.3 doc/man/man3/icetDataReplicationGroup.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index b0b383b..ee664e1 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetDataReplicationGroup.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetDataReplicationGroup.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:53 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetDataReplicationGroupColor.3 doc/man/man3/icetDataReplicationGroupColor.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 444dc1d..b68306c 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetDataReplicationGroupColor.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetDataReplicationGroupColor.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:53 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetDestroyContext.3 doc/man/man3/icetDestroyContext.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index c315131..2e9c938 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetDestroyContext.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetDestroyContext.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 17:14:18 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.TH "icetDestroyContext" "3" "August 9, 2010" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetDestroyContext" "3" "September 22, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetDestroyContext \-\- delete a context.\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -22,7 +22,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TS H
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ l l l .
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-void \fBicetDestroyContext\fP( \fBIceTContext\fP \fIcontext\fP ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void \fBicetDestroyContext\fP( \fBIceTContext\fP \fIcontext\fP );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH Description
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetDestroyMPICommunicator.3 doc/man/man3/icetDestroyMPICommunicator.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index c08663b..a8132ba 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetDestroyMPICommunicator.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetDestroyMPICommunicator.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:53 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetDiagnostics.3 doc/man/man3/icetDiagnostics.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d5489ce..061c655 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetDiagnostics.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetDiagnostics.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:53 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetDisable.3 doc/man/man3/icetDisable.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 02b9560..869921a 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetDisable.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetDisable.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Fri Sep 26 14:31:02 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.TH "icetEnable" "3" "July 11, 2011" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetEnable" "3" "September 26, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetEnable\fP,\fBicetDisable\fP\-\- enable/disable an \fBIceT \fPfeature.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -44,17 +44,18 @@ are:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ images partitions are always collected to display processes. When this
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ option is turned off, the strategy has the option of leaving images
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ partitioned among processes. Each process containing part of a tile\&'s
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-image will return the entire buffer from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-in an \fBIceTImage\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-object. However, only
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-certain pixels will be valid. The state variables
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_TILE\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++image will return the entire buffer from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetCompositeImage\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++in an
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBIceTImage\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++object. However, only certain pixels will be valid.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++The state variables \fBICET_VALID_PIXELS_TILE\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_OFFSET\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-and \fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-give which tile the pixels belong
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-to and what range of pixels are valid.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++give which tile the pixels belong to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and what range of pixels are valid.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPOSITE_ONE_BUFFER\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Turn this option on when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -72,10 +73,11 @@ cause the color to be blended back into the resulting images. This
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ flag is disabled by default.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_FLOATING_VIEWPORT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- If enabled, the projection will
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-be shifted such that the geometry will be rendered in one shot whenever
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-possible, even if the geometry straddles up to four tiles. This flag
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-is enabled by default.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ .igfloating viewport
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++If
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++enabled, the projection will be shifted such that the geometry will be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++rendered in one shot whenever possible, even if the geometry straddles
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++up to four tiles. This flag is enabled by default.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_INTERLACE_IMAGES\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ If enabled, pixels in images
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -95,6 +97,26 @@ enabled, you should call \fBicetCompositeOrder\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ between each frame
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ to update the image order as camera angles change. This flag is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ disabled by default.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_RENDER_EMPTY_IMAGES\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ If disabled, \fBIceT \fPwill never
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++invoke the drawing callback.igdrawing callback
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++if all geometry is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++outside the clipping planes of the current projection. If enabled,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBIceT \fPwill still invoke the drawing callback \fIif\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the compositing
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++strategy has requested the tile. However, most compositing strategies
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++do not request images for all tiles. The floating viewport can also
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++consolidate up to four renderings into one. To ensure that the drawing
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++callback is invoked for all tiles on all processes, enable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_RENDER_EMPTY_IMAGES\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++disable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_FLOATING_VIEWPORT\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and set the strategy (using
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetStrategy\fP)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to \fBICET_STRATEGY_SEQUENTIAL\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++This flag
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is disabled by default.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ In addition, if you are using the \fbOpenGL \fPlayer (i.e., have called
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLInitialize\fP),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetDrawCallback.3 doc/man/man3/icetDrawCallback.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 4a001cb..3444dcb 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetDrawCallback.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetDrawCallback.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:53 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetDrawFrame.3 doc/man/man3/icetDrawFrame.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 6bf89e5..3e93ed7 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetDrawFrame.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetDrawFrame.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Fri Sep 26 14:31:02 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.TH "icetDrawFrame" "3" "August 9, 2010" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetDrawFrame" "3" "September 22, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetDrawFrame \-\- renders and composites a frame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -68,16 +68,32 @@ to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ then use the version passed to the drawing callback.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++The \fIbackground_color\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++argument specifies the desired background
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++color for the image. It is given as an array of 4 floating point values
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++specifying, in order, the red, green, blue, and alpha channels of the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++color in the range from 0.0 to 1.0\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++When rendering using a depth buffer, the background color is used to fill
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++in empty regions of images. When rendering using color blending, the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++background color is changed to transparent black during rendering to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++prevent the background from being blended multiple times from different
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++renderings. If the \fBICET_CORRECT_COLORED_BACKGROUND\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++feature is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++enabled, this background color is blended back into the final composited
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++image.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH Return Value
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ On each .igdisplay processdisplay
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ process (as defined by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetAddTile\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetAddTile\fP),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-returns an image of the fully
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-composited image. The contents of the image are undefined for any
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-non\-display process.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++returns the fully composited
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++image in an \fBIceTImage\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++object. The contents of the image are
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++undefined for any non\-display process.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ If the \fBICET_COMPOSITE_ONE_BUFFER\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ option is on and both a color
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -90,18 +106,17 @@ might save some time by not transferring depth information at the latter
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ stage of compositing.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The returned image uses memory buffers that will be reclaimed the next
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-time \fBIceT \fPrenders a frame. Do not use this image after the next call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-(unless you have changed the \fBIceT \fPcontext).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++time \fBIceT \fPrenders or composites a frame. Do not use this image after
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the next call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(unless you have changed the \fBIceT \fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++context).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH Errors
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_INVALID_OPERATION\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Raised if the \fBicetGLInitialize\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-has not been called or if the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-drawing callback has not been set. Also can be raised if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Raised if the drawing callback has not been set. Also can be raised if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ is called recursively, probably from within the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ drawing callback.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -128,7 +143,7 @@ requested. This
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ can be corrected by blending the returned image over the desired
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ background. This will be done for you if the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_CORRECT_COLORED_BACKGROUND\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-is on.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++feature is enabled.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH Copyright
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -145,6 +160,7 @@ This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fIicetAddTile\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fIicetBoundingBox\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fIicetBoundingVertices\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIicetCompositeImage\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fIicetDrawCallback\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fIicetGLDrawFrame\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fIicetSingleImageStrategy\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetEnable.3 doc/man/man3/icetEnable.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 02b9560..869921a 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetEnable.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetEnable.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Fri Sep 26 14:31:02 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.TH "icetEnable" "3" "July 11, 2011" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetEnable" "3" "September 26, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetEnable\fP,\fBicetDisable\fP\-\- enable/disable an \fBIceT \fPfeature.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -44,17 +44,18 @@ are:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ images partitions are always collected to display processes. When this
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ option is turned off, the strategy has the option of leaving images
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ partitioned among processes. Each process containing part of a tile\&'s
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-image will return the entire buffer from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-in an \fBIceTImage\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-object. However, only
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-certain pixels will be valid. The state variables
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_TILE\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++image will return the entire buffer from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetCompositeImage\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++in an
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBIceTImage\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++object. However, only certain pixels will be valid.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++The state variables \fBICET_VALID_PIXELS_TILE\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_OFFSET\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-and \fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-give which tile the pixels belong
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-to and what range of pixels are valid.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++give which tile the pixels belong to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and what range of pixels are valid.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPOSITE_ONE_BUFFER\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Turn this option on when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -72,10 +73,11 @@ cause the color to be blended back into the resulting images. This
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ flag is disabled by default.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_FLOATING_VIEWPORT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- If enabled, the projection will
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-be shifted such that the geometry will be rendered in one shot whenever
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-possible, even if the geometry straddles up to four tiles. This flag
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-is enabled by default.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ .igfloating viewport
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++If
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++enabled, the projection will be shifted such that the geometry will be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++rendered in one shot whenever possible, even if the geometry straddles
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++up to four tiles. This flag is enabled by default.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_INTERLACE_IMAGES\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ If enabled, pixels in images
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -95,6 +97,26 @@ enabled, you should call \fBicetCompositeOrder\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ between each frame
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ to update the image order as camera angles change. This flag is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ disabled by default.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_RENDER_EMPTY_IMAGES\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ If disabled, \fBIceT \fPwill never
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++invoke the drawing callback.igdrawing callback
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++if all geometry is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++outside the clipping planes of the current projection. If enabled,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBIceT \fPwill still invoke the drawing callback \fIif\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the compositing
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++strategy has requested the tile. However, most compositing strategies
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++do not request images for all tiles. The floating viewport can also
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++consolidate up to four renderings into one. To ensure that the drawing
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++callback is invoked for all tiles on all processes, enable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_RENDER_EMPTY_IMAGES\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++disable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_FLOATING_VIEWPORT\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and set the strategy (using
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetStrategy\fP)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to \fBICET_STRATEGY_SEQUENTIAL\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++This flag
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is disabled by default.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ In addition, if you are using the \fbOpenGL \fPlayer (i.e., have called
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLInitialize\fP),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetGLDrawCallback.3 doc/man/man3/icetGLDrawCallback.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index e73b1d9..f4a57d5 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetGLDrawCallback.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetGLDrawCallback.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:53 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetGLDrawFrame.3 doc/man/man3/icetGLDrawFrame.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 5c98986..91e0e74 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetGLDrawFrame.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetGLDrawFrame.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Fri Sep 26 14:31:03 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.TH "icetGLDrawFrame" "3" "September 20, 2010" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetGLDrawFrame" "3" "September 26, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame \-\- renders and composites a frame using \fbOpenGL \fP\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -86,8 +86,10 @@ tile.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_INVALID_OPERATION\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Raised if the drawing callback has not been set. Also can be raised if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Raised if the \fBicetGLInitialize\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++has not been called or if the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++drawing callback has not been set. Also can be raised if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ is called recursively, probably from within the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ drawing callback.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetGLInitialize.3 doc/man/man3/icetGLInitialize.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index ed28d1d..0f19a8d 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetGLInitialize.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetGLInitialize.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetGLIsInitialized.3 doc/man/man3/icetGLIsInitialized.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 99193de..6bfa2fb 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetGLIsInitialized.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetGLIsInitialized.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetGLSetReadBuffer.3 doc/man/man3/icetGLSetReadBuffer.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index e483ad3..665ea11 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetGLSetReadBuffer.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetGLSetReadBuffer.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetGet.3 doc/man/man3/icetGet.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a419be2..7368ac5 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetGet.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetGet.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Fri Sep 26 14:33:26 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.TH "icetGet" "3" "July 11, 2011" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetGet" "3" "September 26, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGet \-\- get an \fBIceT \fPstate parameter\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -90,11 +90,12 @@ description of the associated state parameter.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The color that \fBIceT \fPis currently
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ assuming is the background color. It is an RGBA value that is stored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ as four floating point values. This value is set either to the last
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-value passed to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the \fbOpenGL \fPbackground color if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-was called, or to black for color blending.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-(The correct background color is restored later.)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++value passed to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the \fbOpenGL \fPbackground color if \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++was called, or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to black for color blending. (The correct background color is restored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++later.)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BACKGROUND_COLOR_WORD\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The same as
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -106,40 +107,48 @@ rapidly fill the background of color buffers.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BLEND_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ performing color blending of images during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-An alias for this value is \fBICET_COMPARE_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double. An alias for this value
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is \fBICET_COMPARE_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ copying buffer data and reading from \fbOpenGL \fPbuffers during the last
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BUFFER_WRITE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ spent writing to \fbOpenGL \fPbuffers during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Always set to 0.0 after a call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BYTES_SENT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total number of bytes sent by the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ calling process for transferring image data during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as an
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-integer.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as an integer.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COLLECT_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time spent in collecting
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ image fragments to display processes during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COLOR_FORMAT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The color format of images to be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -153,10 +162,12 @@ particular image.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPARE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ performing Z comparisons of images during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-An alias for this value is \fBICET_BLEND_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double. An alias for this value
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is \fBICET_BLEND_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPOSITE_MODE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The composite mode set by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -178,22 +189,24 @@ image generated by process j\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPOSITE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-compositing during the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Equal to $\fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_RENDER_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\- \fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++compositing during the last call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Equal to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$\fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\- \fBICET_RENDER_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_BUFFER_WRITE_TIME\fP$.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\- \fBICET_BUFFER_WRITE_TIME\fP$.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPRESS_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compressing image data using active pixel encoding during the last call
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_DATA_REPLICATION_GROUP\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -240,10 +253,11 @@ function, as set by \fBicetDrawCallback\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_FRAME_COUNT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The number of times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-has been called for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++has been called for the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_GEOMETRY_BOUNDS\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ An array of vertices whose convex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -324,6 +338,8 @@ object associated with the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the drawing callback during the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Always set to 0.0 after a call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_SINGLE_IMAGE_STRATEGY\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -377,39 +393,41 @@ viewports are listed in the same order as the tiles were defined with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Time spent in the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-This includes all
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the time to render, read back, compress, and composite images. Stored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++This includes all the time to render, read
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++back, compress, and composite images. Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ In conjunction with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_OFFSET\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gives the range of valid pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-for the last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Given the arrays of pixels returned with the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-and \fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-functions, the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-valid pixels start at the pixel indexed by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++for the last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Given the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++arrays of pixels returned with the \fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++functions, the valid pixels start at the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixel indexed by \fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and continue for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The tile to which these pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ belong are captured in the \fBICET_VALID_PIXELS_TILE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-variable. If the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-did not return pixels for the local process,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-is set to 0\&. This state variable is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-only useful when \fBICET_COLLECT_IMAGES\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-is off. If on, it can
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-be assumed that all display processes contain all pixels in the image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++variable. If the last call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++did not return
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixels for the local process, \fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is set
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to 0\&. This state variable is only useful when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_COLLECT_IMAGES\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is off. If on, it can be assumed that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++all display processes contain all pixels in the image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (\fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ is the number of pixels in the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ image), and all other processes have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -418,15 +436,15 @@ image), and all other processes have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ In conjunction with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gives the range of valid pixels for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Given the arrays of pixels returned with the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-and \fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-functions, the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-valid pixels start at the pixel indexed by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Given the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++arrays of pixels returned with the \fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++functions, the valid pixels start at the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixel indexed by \fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and continue for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The tile to which these pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -442,11 +460,13 @@ have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_TILE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Gives the tile for which the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-contains pixels. Each process has its own
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-value. If the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++contains pixels.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Each process has its own value. If the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ did not return pixels for the local process,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetGetBooleanv.3 doc/man/man3/icetGetBooleanv.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a419be2..7368ac5 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetGetBooleanv.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetGetBooleanv.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Fri Sep 26 14:33:26 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.TH "icetGet" "3" "July 11, 2011" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetGet" "3" "September 26, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGet \-\- get an \fBIceT \fPstate parameter\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -90,11 +90,12 @@ description of the associated state parameter.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The color that \fBIceT \fPis currently
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ assuming is the background color. It is an RGBA value that is stored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ as four floating point values. This value is set either to the last
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-value passed to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the \fbOpenGL \fPbackground color if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-was called, or to black for color blending.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-(The correct background color is restored later.)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++value passed to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the \fbOpenGL \fPbackground color if \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++was called, or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to black for color blending. (The correct background color is restored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++later.)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BACKGROUND_COLOR_WORD\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The same as
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -106,40 +107,48 @@ rapidly fill the background of color buffers.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BLEND_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ performing color blending of images during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-An alias for this value is \fBICET_COMPARE_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double. An alias for this value
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is \fBICET_COMPARE_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ copying buffer data and reading from \fbOpenGL \fPbuffers during the last
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BUFFER_WRITE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ spent writing to \fbOpenGL \fPbuffers during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Always set to 0.0 after a call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BYTES_SENT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total number of bytes sent by the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ calling process for transferring image data during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as an
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-integer.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as an integer.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COLLECT_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time spent in collecting
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ image fragments to display processes during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COLOR_FORMAT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The color format of images to be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -153,10 +162,12 @@ particular image.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPARE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ performing Z comparisons of images during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-An alias for this value is \fBICET_BLEND_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double. An alias for this value
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is \fBICET_BLEND_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPOSITE_MODE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The composite mode set by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -178,22 +189,24 @@ image generated by process j\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPOSITE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-compositing during the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Equal to $\fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_RENDER_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\- \fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++compositing during the last call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Equal to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$\fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\- \fBICET_RENDER_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_BUFFER_WRITE_TIME\fP$.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\- \fBICET_BUFFER_WRITE_TIME\fP$.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPRESS_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compressing image data using active pixel encoding during the last call
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_DATA_REPLICATION_GROUP\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -240,10 +253,11 @@ function, as set by \fBicetDrawCallback\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_FRAME_COUNT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The number of times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-has been called for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++has been called for the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_GEOMETRY_BOUNDS\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ An array of vertices whose convex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -324,6 +338,8 @@ object associated with the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the drawing callback during the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Always set to 0.0 after a call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_SINGLE_IMAGE_STRATEGY\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -377,39 +393,41 @@ viewports are listed in the same order as the tiles were defined with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Time spent in the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-This includes all
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the time to render, read back, compress, and composite images. Stored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++This includes all the time to render, read
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++back, compress, and composite images. Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ In conjunction with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_OFFSET\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gives the range of valid pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-for the last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Given the arrays of pixels returned with the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-and \fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-functions, the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-valid pixels start at the pixel indexed by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++for the last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Given the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++arrays of pixels returned with the \fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++functions, the valid pixels start at the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixel indexed by \fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and continue for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The tile to which these pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ belong are captured in the \fBICET_VALID_PIXELS_TILE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-variable. If the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-did not return pixels for the local process,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-is set to 0\&. This state variable is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-only useful when \fBICET_COLLECT_IMAGES\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-is off. If on, it can
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-be assumed that all display processes contain all pixels in the image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++variable. If the last call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++did not return
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixels for the local process, \fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is set
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to 0\&. This state variable is only useful when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_COLLECT_IMAGES\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is off. If on, it can be assumed that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++all display processes contain all pixels in the image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (\fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ is the number of pixels in the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ image), and all other processes have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -418,15 +436,15 @@ image), and all other processes have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ In conjunction with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gives the range of valid pixels for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Given the arrays of pixels returned with the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-and \fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-functions, the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-valid pixels start at the pixel indexed by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Given the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++arrays of pixels returned with the \fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++functions, the valid pixels start at the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixel indexed by \fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and continue for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The tile to which these pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -442,11 +460,13 @@ have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_TILE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Gives the tile for which the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-contains pixels. Each process has its own
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-value. If the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++contains pixels.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Each process has its own value. If the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ did not return pixels for the local process,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetGetContext.3 doc/man/man3/icetGetContext.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 1b7654a..32405e6 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetGetContext.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetGetContext.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:53 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetGetDoublev.3 doc/man/man3/icetGetDoublev.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a419be2..7368ac5 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetGetDoublev.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetGetDoublev.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Fri Sep 26 14:33:26 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.TH "icetGet" "3" "July 11, 2011" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetGet" "3" "September 26, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGet \-\- get an \fBIceT \fPstate parameter\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -90,11 +90,12 @@ description of the associated state parameter.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The color that \fBIceT \fPis currently
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ assuming is the background color. It is an RGBA value that is stored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ as four floating point values. This value is set either to the last
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-value passed to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the \fbOpenGL \fPbackground color if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-was called, or to black for color blending.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-(The correct background color is restored later.)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++value passed to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the \fbOpenGL \fPbackground color if \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++was called, or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to black for color blending. (The correct background color is restored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++later.)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BACKGROUND_COLOR_WORD\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The same as
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -106,40 +107,48 @@ rapidly fill the background of color buffers.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BLEND_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ performing color blending of images during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-An alias for this value is \fBICET_COMPARE_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double. An alias for this value
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is \fBICET_COMPARE_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ copying buffer data and reading from \fbOpenGL \fPbuffers during the last
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BUFFER_WRITE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ spent writing to \fbOpenGL \fPbuffers during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Always set to 0.0 after a call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BYTES_SENT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total number of bytes sent by the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ calling process for transferring image data during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as an
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-integer.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as an integer.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COLLECT_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time spent in collecting
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ image fragments to display processes during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COLOR_FORMAT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The color format of images to be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -153,10 +162,12 @@ particular image.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPARE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ performing Z comparisons of images during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-An alias for this value is \fBICET_BLEND_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double. An alias for this value
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is \fBICET_BLEND_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPOSITE_MODE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The composite mode set by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -178,22 +189,24 @@ image generated by process j\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPOSITE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-compositing during the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Equal to $\fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_RENDER_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\- \fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++compositing during the last call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Equal to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$\fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\- \fBICET_RENDER_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_BUFFER_WRITE_TIME\fP$.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\- \fBICET_BUFFER_WRITE_TIME\fP$.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPRESS_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compressing image data using active pixel encoding during the last call
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_DATA_REPLICATION_GROUP\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -240,10 +253,11 @@ function, as set by \fBicetDrawCallback\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_FRAME_COUNT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The number of times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-has been called for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++has been called for the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_GEOMETRY_BOUNDS\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ An array of vertices whose convex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -324,6 +338,8 @@ object associated with the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the drawing callback during the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Always set to 0.0 after a call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_SINGLE_IMAGE_STRATEGY\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -377,39 +393,41 @@ viewports are listed in the same order as the tiles were defined with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Time spent in the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-This includes all
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the time to render, read back, compress, and composite images. Stored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++This includes all the time to render, read
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++back, compress, and composite images. Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ In conjunction with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_OFFSET\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gives the range of valid pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-for the last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Given the arrays of pixels returned with the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-and \fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-functions, the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-valid pixels start at the pixel indexed by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++for the last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Given the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++arrays of pixels returned with the \fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++functions, the valid pixels start at the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixel indexed by \fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and continue for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The tile to which these pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ belong are captured in the \fBICET_VALID_PIXELS_TILE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-variable. If the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-did not return pixels for the local process,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-is set to 0\&. This state variable is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-only useful when \fBICET_COLLECT_IMAGES\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-is off. If on, it can
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-be assumed that all display processes contain all pixels in the image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++variable. If the last call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++did not return
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixels for the local process, \fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is set
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to 0\&. This state variable is only useful when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_COLLECT_IMAGES\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is off. If on, it can be assumed that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++all display processes contain all pixels in the image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (\fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ is the number of pixels in the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ image), and all other processes have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -418,15 +436,15 @@ image), and all other processes have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ In conjunction with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gives the range of valid pixels for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Given the arrays of pixels returned with the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-and \fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-functions, the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-valid pixels start at the pixel indexed by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Given the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++arrays of pixels returned with the \fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++functions, the valid pixels start at the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixel indexed by \fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and continue for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The tile to which these pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -442,11 +460,13 @@ have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_TILE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Gives the tile for which the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-contains pixels. Each process has its own
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-value. If the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++contains pixels.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Each process has its own value. If the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ did not return pixels for the local process,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetGetError.3 doc/man/man3/icetGetError.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 96c14be..53a622d 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetGetError.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetGetError.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:53 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetGetFloatv.3 doc/man/man3/icetGetFloatv.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a419be2..7368ac5 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetGetFloatv.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetGetFloatv.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Fri Sep 26 14:33:26 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.TH "icetGet" "3" "July 11, 2011" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetGet" "3" "September 26, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGet \-\- get an \fBIceT \fPstate parameter\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -90,11 +90,12 @@ description of the associated state parameter.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The color that \fBIceT \fPis currently
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ assuming is the background color. It is an RGBA value that is stored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ as four floating point values. This value is set either to the last
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-value passed to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the \fbOpenGL \fPbackground color if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-was called, or to black for color blending.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-(The correct background color is restored later.)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++value passed to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the \fbOpenGL \fPbackground color if \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++was called, or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to black for color blending. (The correct background color is restored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++later.)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BACKGROUND_COLOR_WORD\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The same as
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -106,40 +107,48 @@ rapidly fill the background of color buffers.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BLEND_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ performing color blending of images during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-An alias for this value is \fBICET_COMPARE_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double. An alias for this value
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is \fBICET_COMPARE_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ copying buffer data and reading from \fbOpenGL \fPbuffers during the last
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BUFFER_WRITE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ spent writing to \fbOpenGL \fPbuffers during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Always set to 0.0 after a call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BYTES_SENT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total number of bytes sent by the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ calling process for transferring image data during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as an
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-integer.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as an integer.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COLLECT_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time spent in collecting
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ image fragments to display processes during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COLOR_FORMAT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The color format of images to be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -153,10 +162,12 @@ particular image.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPARE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ performing Z comparisons of images during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-An alias for this value is \fBICET_BLEND_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double. An alias for this value
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is \fBICET_BLEND_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPOSITE_MODE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The composite mode set by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -178,22 +189,24 @@ image generated by process j\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPOSITE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-compositing during the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Equal to $\fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_RENDER_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\- \fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++compositing during the last call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Equal to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$\fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\- \fBICET_RENDER_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_BUFFER_WRITE_TIME\fP$.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\- \fBICET_BUFFER_WRITE_TIME\fP$.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPRESS_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compressing image data using active pixel encoding during the last call
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_DATA_REPLICATION_GROUP\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -240,10 +253,11 @@ function, as set by \fBicetDrawCallback\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_FRAME_COUNT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The number of times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-has been called for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++has been called for the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_GEOMETRY_BOUNDS\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ An array of vertices whose convex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -324,6 +338,8 @@ object associated with the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the drawing callback during the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Always set to 0.0 after a call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_SINGLE_IMAGE_STRATEGY\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -377,39 +393,41 @@ viewports are listed in the same order as the tiles were defined with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Time spent in the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-This includes all
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the time to render, read back, compress, and composite images. Stored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++This includes all the time to render, read
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++back, compress, and composite images. Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ In conjunction with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_OFFSET\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gives the range of valid pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-for the last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Given the arrays of pixels returned with the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-and \fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-functions, the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-valid pixels start at the pixel indexed by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++for the last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Given the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++arrays of pixels returned with the \fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++functions, the valid pixels start at the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixel indexed by \fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and continue for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The tile to which these pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ belong are captured in the \fBICET_VALID_PIXELS_TILE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-variable. If the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-did not return pixels for the local process,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-is set to 0\&. This state variable is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-only useful when \fBICET_COLLECT_IMAGES\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-is off. If on, it can
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-be assumed that all display processes contain all pixels in the image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++variable. If the last call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++did not return
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixels for the local process, \fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is set
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to 0\&. This state variable is only useful when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_COLLECT_IMAGES\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is off. If on, it can be assumed that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++all display processes contain all pixels in the image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (\fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ is the number of pixels in the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ image), and all other processes have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -418,15 +436,15 @@ image), and all other processes have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ In conjunction with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gives the range of valid pixels for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Given the arrays of pixels returned with the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-and \fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-functions, the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-valid pixels start at the pixel indexed by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Given the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++arrays of pixels returned with the \fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++functions, the valid pixels start at the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixel indexed by \fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and continue for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The tile to which these pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -442,11 +460,13 @@ have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_TILE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Gives the tile for which the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-contains pixels. Each process has its own
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-value. If the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++contains pixels.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Each process has its own value. If the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ did not return pixels for the local process,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetGetIntegerv.3 doc/man/man3/icetGetIntegerv.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a419be2..7368ac5 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetGetIntegerv.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetGetIntegerv.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Fri Sep 26 14:33:26 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.TH "icetGet" "3" "July 11, 2011" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetGet" "3" "September 26, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGet \-\- get an \fBIceT \fPstate parameter\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -90,11 +90,12 @@ description of the associated state parameter.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The color that \fBIceT \fPis currently
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ assuming is the background color. It is an RGBA value that is stored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ as four floating point values. This value is set either to the last
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-value passed to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the \fbOpenGL \fPbackground color if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-was called, or to black for color blending.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-(The correct background color is restored later.)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++value passed to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the \fbOpenGL \fPbackground color if \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++was called, or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to black for color blending. (The correct background color is restored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++later.)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BACKGROUND_COLOR_WORD\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The same as
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -106,40 +107,48 @@ rapidly fill the background of color buffers.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BLEND_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ performing color blending of images during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-An alias for this value is \fBICET_COMPARE_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double. An alias for this value
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is \fBICET_COMPARE_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ copying buffer data and reading from \fbOpenGL \fPbuffers during the last
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BUFFER_WRITE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ spent writing to \fbOpenGL \fPbuffers during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Always set to 0.0 after a call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BYTES_SENT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total number of bytes sent by the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ calling process for transferring image data during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as an
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-integer.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as an integer.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COLLECT_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time spent in collecting
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ image fragments to display processes during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COLOR_FORMAT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The color format of images to be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -153,10 +162,12 @@ particular image.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPARE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ performing Z comparisons of images during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-An alias for this value is \fBICET_BLEND_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double. An alias for this value
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is \fBICET_BLEND_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPOSITE_MODE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The composite mode set by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -178,22 +189,24 @@ image generated by process j\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPOSITE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-compositing during the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Equal to $\fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_RENDER_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\- \fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++compositing during the last call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Equal to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$\fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\- \fBICET_RENDER_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_BUFFER_WRITE_TIME\fP$.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\- \fBICET_BUFFER_WRITE_TIME\fP$.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPRESS_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compressing image data using active pixel encoding during the last call
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_DATA_REPLICATION_GROUP\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -240,10 +253,11 @@ function, as set by \fBicetDrawCallback\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_FRAME_COUNT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The number of times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-has been called for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++has been called for the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_GEOMETRY_BOUNDS\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ An array of vertices whose convex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -324,6 +338,8 @@ object associated with the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the drawing callback during the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Always set to 0.0 after a call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_SINGLE_IMAGE_STRATEGY\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -377,39 +393,41 @@ viewports are listed in the same order as the tiles were defined with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Time spent in the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-This includes all
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the time to render, read back, compress, and composite images. Stored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++This includes all the time to render, read
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++back, compress, and composite images. Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ In conjunction with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_OFFSET\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gives the range of valid pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-for the last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Given the arrays of pixels returned with the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-and \fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-functions, the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-valid pixels start at the pixel indexed by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++for the last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Given the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++arrays of pixels returned with the \fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++functions, the valid pixels start at the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixel indexed by \fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and continue for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The tile to which these pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ belong are captured in the \fBICET_VALID_PIXELS_TILE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-variable. If the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-did not return pixels for the local process,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-is set to 0\&. This state variable is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-only useful when \fBICET_COLLECT_IMAGES\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-is off. If on, it can
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-be assumed that all display processes contain all pixels in the image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++variable. If the last call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++did not return
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixels for the local process, \fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is set
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to 0\&. This state variable is only useful when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_COLLECT_IMAGES\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is off. If on, it can be assumed that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++all display processes contain all pixels in the image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (\fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ is the number of pixels in the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ image), and all other processes have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -418,15 +436,15 @@ image), and all other processes have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ In conjunction with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gives the range of valid pixels for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Given the arrays of pixels returned with the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-and \fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-functions, the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-valid pixels start at the pixel indexed by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Given the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++arrays of pixels returned with the \fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++functions, the valid pixels start at the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixel indexed by \fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and continue for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The tile to which these pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -442,11 +460,13 @@ have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_TILE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Gives the tile for which the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-contains pixels. Each process has its own
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-value. If the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++contains pixels.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Each process has its own value. If the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ did not return pixels for the local process,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetGetPointerv.3 doc/man/man3/icetGetPointerv.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a419be2..7368ac5 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetGetPointerv.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetGetPointerv.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:54 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Fri Sep 26 14:33:26 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.TH "icetGet" "3" "July 11, 2011" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetGet" "3" "September 26, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGet \-\- get an \fBIceT \fPstate parameter\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -90,11 +90,12 @@ description of the associated state parameter.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The color that \fBIceT \fPis currently
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ assuming is the background color. It is an RGBA value that is stored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ as four floating point values. This value is set either to the last
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-value passed to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the \fbOpenGL \fPbackground color if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-was called, or to black for color blending.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-(The correct background color is restored later.)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++value passed to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the \fbOpenGL \fPbackground color if \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++was called, or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to black for color blending. (The correct background color is restored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++later.)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BACKGROUND_COLOR_WORD\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The same as
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -106,40 +107,48 @@ rapidly fill the background of color buffers.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BLEND_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ performing color blending of images during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-An alias for this value is \fBICET_COMPARE_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double. An alias for this value
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is \fBICET_COMPARE_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ copying buffer data and reading from \fbOpenGL \fPbuffers during the last
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BUFFER_WRITE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ spent writing to \fbOpenGL \fPbuffers during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Always set to 0.0 after a call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_BYTES_SENT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total number of bytes sent by the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ calling process for transferring image data during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as an
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-integer.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as an integer.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COLLECT_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time spent in collecting
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ image fragments to display processes during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COLOR_FORMAT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The color format of images to be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -153,10 +162,12 @@ particular image.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPARE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ performing Z comparisons of images during the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-An alias for this value is \fBICET_BLEND_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Stored as a double. An alias for this value
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is \fBICET_BLEND_TIME\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPOSITE_MODE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The composite mode set by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -178,22 +189,24 @@ image generated by process j\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPOSITE_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-compositing during the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Equal to $\fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_RENDER_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\- \fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++compositing during the last call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Equal to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$\fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\- \fBICET_RENDER_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_BUFFER_WRITE_TIME\fP$.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_BUFFER_READ_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\- \fBICET_BUFFER_WRITE_TIME\fP$.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_COMPRESS_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The total time, in seconds, spent in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compressing image data using active pixel encoding during the last call
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_DATA_REPLICATION_GROUP\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -240,10 +253,11 @@ function, as set by \fBicetDrawCallback\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_FRAME_COUNT\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The number of times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-has been called for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++has been called for the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_GEOMETRY_BOUNDS\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ An array of vertices whose convex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -324,6 +338,8 @@ object associated with the current context.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the drawing callback during the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Always set to 0.0 after a call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_SINGLE_IMAGE_STRATEGY\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -377,39 +393,41 @@ viewports are listed in the same order as the tiles were defined with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_TOTAL_DRAW_TIME\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Time spent in the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-This includes all
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the time to render, read back, compress, and composite images. Stored
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++This includes all the time to render, read
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++back, compress, and composite images. Stored as a double.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ In conjunction with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_OFFSET\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gives the range of valid pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-for the last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Given the arrays of pixels returned with the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-and \fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-functions, the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-valid pixels start at the pixel indexed by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++for the last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Given the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++arrays of pixels returned with the \fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++functions, the valid pixels start at the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixel indexed by \fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and continue for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The tile to which these pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ belong are captured in the \fBICET_VALID_PIXELS_TILE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-variable. If the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-did not return pixels for the local process,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-is set to 0\&. This state variable is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-only useful when \fBICET_COLLECT_IMAGES\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-is off. If on, it can
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-be assumed that all display processes contain all pixels in the image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++variable. If the last call to \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++did not return
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixels for the local process, \fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is set
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to 0\&. This state variable is only useful when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBICET_COLLECT_IMAGES\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++is off. If on, it can be assumed that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++all display processes contain all pixels in the image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (\fBICET_VALID_PIXELS_NUM\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ is the number of pixels in the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ image), and all other processes have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -418,15 +436,15 @@ image), and all other processes have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ In conjunction with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gives the range of valid pixels for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-the last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Given the arrays of pixels returned with the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-and \fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-functions, the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-valid pixels start at the pixel indexed by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++the last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Given the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++arrays of pixels returned with the \fBicetImageGetColor\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetImageGetDepth\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++functions, the valid pixels start at the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pixel indexed by \fBICET_VALID_PIXELS_OFFSET\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and continue for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_NUM\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The tile to which these pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -442,11 +460,13 @@ have no pixel data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .TP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBICET_VALID_PIXELS_TILE\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Gives the tile for which the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-last image returned from \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-contains pixels. Each process has its own
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-value. If the last call to \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++last image returned from \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++contains pixels.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Each process has its own value. If the last call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ did not return pixels for the local process,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetGetSingleImageStrategyName.3 doc/man/man3/icetGetSingleImageStrategyName.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index f325b07..dafe900 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetGetSingleImageStrategyName.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetGetSingleImageStrategyName.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:53 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetGetStrategyName.3 doc/man/man3/icetGetStrategyName.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 226c2e8..70a4561 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetGetStrategyName.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetGetStrategyName.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:53 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageCopyColor.3 doc/man/man3/icetImageCopyColor.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d08aed1..dd5481c 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageCopyColor.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageCopyColor.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageCopyColorf.3 doc/man/man3/icetImageCopyColorf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d08aed1..dd5481c 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageCopyColorf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageCopyColorf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageCopyColorub.3 doc/man/man3/icetImageCopyColorub.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d08aed1..dd5481c 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageCopyColorub.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageCopyColorub.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageCopyDepth.3 doc/man/man3/icetImageCopyDepth.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d08aed1..dd5481c 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageCopyDepth.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageCopyDepth.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageCopyDepthf.3 doc/man/man3/icetImageCopyDepthf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d08aed1..dd5481c 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageCopyDepthf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageCopyDepthf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageGetColor.3 doc/man/man3/icetImageGetColor.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a268f14..23bf851 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageGetColor.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageGetColor.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageGetColorFormat.3 doc/man/man3/icetImageGetColorFormat.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index cf6d005..7ba18f6 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageGetColorFormat.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageGetColorFormat.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageGetColorcf.3 doc/man/man3/icetImageGetColorcf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a268f14..23bf851 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageGetColorcf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageGetColorcf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageGetColorcub.3 doc/man/man3/icetImageGetColorcub.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a268f14..23bf851 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageGetColorcub.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageGetColorcub.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageGetColorcui.3 doc/man/man3/icetImageGetColorcui.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a268f14..23bf851 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageGetColorcui.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageGetColorcui.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageGetColorf.3 doc/man/man3/icetImageGetColorf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a268f14..23bf851 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageGetColorf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageGetColorf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageGetColorub.3 doc/man/man3/icetImageGetColorub.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a268f14..23bf851 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageGetColorub.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageGetColorub.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageGetColorui.3 doc/man/man3/icetImageGetColorui.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a268f14..23bf851 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageGetColorui.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageGetColorui.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageGetDepth.3 doc/man/man3/icetImageGetDepth.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a268f14..23bf851 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageGetDepth.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageGetDepth.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageGetDepthFormat.3 doc/man/man3/icetImageGetDepthFormat.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index cf6d005..7ba18f6 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageGetDepthFormat.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageGetDepthFormat.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageGetDepthcf.3 doc/man/man3/icetImageGetDepthcf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a268f14..23bf851 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageGetDepthcf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageGetDepthcf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageGetDepthf.3 doc/man/man3/icetImageGetDepthf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a268f14..23bf851 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageGetDepthf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageGetDepthf.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageGetHeight.3 doc/man/man3/icetImageGetHeight.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 1ffae0e..e4992c9 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageGetHeight.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageGetHeight.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageGetNumPixels.3 doc/man/man3/icetImageGetNumPixels.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 1ffae0e..e4992c9 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageGetNumPixels.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageGetNumPixels.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageGetWidth.3 doc/man/man3/icetImageGetWidth.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 1ffae0e..e4992c9 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageGetWidth.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageGetWidth.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageIsNull.3 doc/man/man3/icetImageIsNull.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index cd0e92c..d8f5bfb 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageIsNull.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageIsNull.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetImageNull.3 doc/man/man3/icetImageNull.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0f212e6..7575191 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetImageNull.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetImageNull.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetIsEnabled.3 doc/man/man3/icetIsEnabled.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index e8752ae..0f36aea 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetIsEnabled.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetIsEnabled.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:55 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetPhysicalRenderSize.3 doc/man/man3/icetPhysicalRenderSize.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index dcc5181..ba7b4f8 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetPhysicalRenderSize.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetPhysicalRenderSize.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:56 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetResetTiles.3 doc/man/man3/icetResetTiles.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 38966c4..c78f80e 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetResetTiles.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetResetTiles.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:56 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Fri Sep 26 14:31:03 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.TH "icetResetTiles" "3" "August 9, 2010" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetResetTiles" "3" "September 26, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetResetTiles \-\- clears out all tile definitions.\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -63,8 +63,11 @@ None known.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ As a rule, a call to \fBicetResetTiles\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ should always be followed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ with one or more calls to \fBicetAddTile\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-will not work properly if no tiles are in existence.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++will not work
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++properly if no tiles are in existence.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH Copyright
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetSetColorFormat.3 doc/man/man3/icetSetColorFormat.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 46dbca2..b78a1e3 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetSetColorFormat.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetSetColorFormat.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:56 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.TH "icetSetColorFormat" "3" "August 9, 2010" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetSetColorFormat" "3" "September 22, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetSetColorFormat\fP,\fBicetSetDepthFormat\fP\-\- specifies the buffer formats for \fBIceT \fPto use when creating images
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -41,6 +41,8 @@ and of images
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ returned from frame drawing functions (\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++It is also the format expected for image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++buffers passed to \fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The following \fIcolor_format\fPs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ are valid for use in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -114,10 +116,12 @@ Calling either \fBicetSetColorFormat\fPor \fBicetSetDepthFormat\fPdoes \fInot\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ change the format of any existing images. It only changes any
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ subsequently created images.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-The color format must be set before calling either \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Doing otherwise would create inconsistencies
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-in the images created and composed together.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++The color format must be set before calling \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Doing otherwise
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++would create inconsistencies in the images created and composited
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++together.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH Copyright
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetSetContext.3 doc/man/man3/icetSetContext.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a53dcb6..0808927 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetSetContext.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetSetContext.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:56 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetSetDepthFormat.3 doc/man/man3/icetSetDepthFormat.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 46dbca2..b78a1e3 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetSetDepthFormat.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetSetDepthFormat.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:56 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:54 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.TH "icetSetColorFormat" "3" "August 9, 2010" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetSetColorFormat" "3" "September 22, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetSetColorFormat\fP,\fBicetSetDepthFormat\fP\-\- specifies the buffer formats for \fBIceT \fPto use when creating images
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -41,6 +41,8 @@ and of images
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ returned from frame drawing functions (\fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetGLDrawFrame\fP).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++It is also the format expected for image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++buffers passed to \fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The following \fIcolor_format\fPs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ are valid for use in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -114,10 +116,12 @@ Calling either \fBicetSetColorFormat\fPor \fBicetSetDepthFormat\fPdoes \fInot\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ change the format of any existing images. It only changes any
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ subsequently created images.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-The color format must be set before calling either \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-or \fBicetGLDrawFrame\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-Doing otherwise would create inconsistencies
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-in the images created and composed together.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++The color format must be set before calling \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetGLDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetCompositeImage\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Doing otherwise
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++would create inconsistencies in the images created and composited
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++together.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH Copyright
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetSingleImageStrategy.3 doc/man/man3/icetSingleImageStrategy.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 77d836f..bd2fa07 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetSingleImageStrategy.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetSingleImageStrategy.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:56 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Fri Sep 26 14:31:04 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.TH "icetSingleImageStrategy" "3" "August 9, 2010" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetSingleImageStrategy" "3" "September 26, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetSingleImageStrategy \-\- set the sub\-strategy used to composite the image for a single tile.\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -110,8 +110,10 @@ This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH See Also
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIicetCompositeImage\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fIicetDrawFrame\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fIicetGetStrategyName\fP(3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIicetGetStrategyName\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIicetGLDrawFrame\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fIicetSingleImageStrategy\fP(3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetStrategy.3 doc/man/man3/icetStrategy.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index deafcb9..c67f36d 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetStrategy.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetStrategy.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:56 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Fri Sep 26 14:31:04 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.TH "icetStrategy" "3" "August 9, 2010" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.TH "icetStrategy" "3" "September 26, 2014" "\fBIceT \fPReference" "\fBIceT \fPReference"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH NAME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fBicetStrategy \-\- set the strategy used to composite images.\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -33,7 +33,9 @@ images. The algorithm to use is determined by selecting a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fIstrategy\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The strategy is selected with \fBicetStrategy\fP\&.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ A
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-strategy must be selected before \fBicetDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++strategy must be selected before \fBicetDrawFrame\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBicetCompositeImage\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or \fBicetGLDrawFrame\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ is called.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ A strategy is chosen from one of the following provided enumerated
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -141,8 +143,10 @@ This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .SH See Also
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIicetCompositeImage\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fIicetDrawFrame\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fIicetGetStrategyName\fP(3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIicetGetStrategyName\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fIicetGLDrawFrame\fP(3),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \fIicetSingleImageStrategy\fP(3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/man/man3/icetWallTime.3 doc/man/man3/icetWallTime.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index cf4e8d6..7e09c4d 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/man/man3/icetWallTime.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/man/man3/icetWallTime.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '\" t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.\" Manual page created with latex2man on Tue Jul 19 13:11:56 MDT 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.\" Manual page created with latex2man on Mon Sep 22 15:51:55 MDT 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .\" NOTE: This file is generated, DO NOT EDIT.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .de Vb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .ft CW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/communication/CMakeLists.txt src/communication/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 864a46c..a96511f 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/communication/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/communication/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -9,8 +9,16 @@ SET(ICET_MPI_SRCS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mpi.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++SET(ICET_MPI_HEADERS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../include/IceTMPI.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IF (ICET_USE_MPI)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ICET_ADD_LIBRARY(IceTMPI ${ICET_MPI_SRCS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_ADD_LIBRARY(IceTMPI ${ICET_MPI_SRCS} ${ICET_MPI_HEADERS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SET_SOURCE_FILES_PROPERTIES(${ICET_MPI_HEADERS}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PROPERTIES HEADER_FILE_ONLY TRUE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TARGET_LINK_LIBRARIES(IceTMPI
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTCore
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/communication/mpi.c src/communication/mpi.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 2bc24d3..fcc0696 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/communication/mpi.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/communication/mpi.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -29,73 +29,76 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_MPI_TEMP_BUFFER_0 (ICET_COMMUNICATION_LAYER_START | (IceTEnum)0x00)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static IceTCommunicator Duplicate(IceTCommunicator self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Destroy(IceTCommunicator self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Barrier(IceTCommunicator self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Send(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int tag);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Recv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int src,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int tag);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Sendrecv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum sendtype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int sendtag,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void *recvbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int recvcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum recvtype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int src,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int recvtag);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Gather(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void *recvbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int root);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Gatherv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTCommunicator MPIDuplicate(IceTCommunicator self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTCommunicator MPISubset(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt32 *ranks);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPIDestroy(IceTCommunicator self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPIBarrier(IceTCommunicator self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPISend(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void *recvbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const int *recvcounts,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const int *recvoffsets,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int root);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Allgather(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int tag);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPIRecv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int src,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int tag);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPISendrecv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum sendtype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int sendtag,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *recvbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int recvcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum recvtype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int src,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int recvtag);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPIGather(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void *recvbuf);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Alltoall(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void *recvbuf);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static IceTCommRequest Isend(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int tag);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static IceTCommRequest Irecv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int src,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int tag);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Waitone(IceTCommunicator self, IceTCommRequest *request);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static int Waitany(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int count, IceTCommRequest *array_of_requests);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static int Comm_size(IceTCommunicator self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static int Comm_rank(IceTCommunicator self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *recvbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int root);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPIGatherv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *recvbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const int *recvcounts,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const int *recvoffsets,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int root);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPIAllgather(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *recvbuf);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPIAlltoall(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *recvbuf);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTCommRequest MPIIsend(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int tag);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTCommRequest MPIIrecv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int src,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int tag);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPIWaitone(IceTCommunicator self, IceTCommRequest *request);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int MPIWaitany(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int count, IceTCommRequest *array_of_requests);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int MPIComm_size(IceTCommunicator self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int MPIComm_rank(IceTCommunicator self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ typedef struct IceTMPICommRequestInternalsStruct {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Request request;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -189,33 +192,39 @@ static void ErrorHandler(MPI_Comm *comm, int *errorno, ...)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTCommunicator icetCreateMPICommunicator(MPI_Comm mpi_comm)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTCommunicator comm = malloc(sizeof(struct IceTCommunicatorStruct));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommunicator comm;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef BREAK_ON_MPI_ERROR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Errhandler eh;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (mpi_comm == MPI_COMM_NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_COMM_NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm = malloc(sizeof(struct IceTCommunicatorStruct));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (comm == NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetRaiseError("Could not allocate memory for IceTCommunicator.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_OUT_OF_MEMORY);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm->Duplicate = Duplicate;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm->Destroy = Destroy;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm->Barrier = Barrier;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm->Send = Send;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm->Recv = Recv;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm->Sendrecv = Sendrecv;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm->Gather = Gather;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm->Gatherv = Gatherv;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm->Allgather = Allgather;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm->Alltoall = Alltoall;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm->Isend = Isend;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm->Irecv = Irecv;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm->Wait = Waitone;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm->Waitany = Waitany;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm->Comm_size = Comm_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm->Comm_rank = Comm_rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Duplicate = MPIDuplicate;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Subset = MPISubset;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Destroy = MPIDestroy;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Barrier = MPIBarrier;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Send = MPISend;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Recv = MPIRecv;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Sendrecv = MPISendrecv;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Gather = MPIGather;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Gatherv = MPIGatherv;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Allgather = MPIAllgather;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Alltoall = MPIAlltoall;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Isend = MPIIsend;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Irecv = MPIIrecv;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Wait = MPIWaitone;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Waitany = MPIWaitany;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Comm_size = MPIComm_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Comm_rank = MPIComm_rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ comm->data = malloc(sizeof(MPI_Comm));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (comm->data == NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -227,9 +236,15 @@ IceTCommunicator icetCreateMPICommunicator(MPI_Comm mpi_comm)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Comm_dup(mpi_comm, (MPI_Comm *)comm->data);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef BREAK_ON_MPI_ERROR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MPI_VERSION < 2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Errhandler_create(ErrorHandler, &eh);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Errhandler_set(*((MPI_Comm *)comm->data), eh);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Errhandler_free(&eh);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else /* MPI_VERSION >= 2 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MPI_Comm_create_errhandler(ErrorHandler, &eh);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MPI_Comm_set_errhandler(*((MPI_Comm *)comm->data), eh);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MPI_Errhandler_free(&eh);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif /* MPI_VERSION >= 2 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return comm;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -237,25 +252,56 @@ IceTCommunicator icetCreateMPICommunicator(MPI_Comm mpi_comm)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void icetDestroyMPICommunicator(IceTCommunicator comm)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm->Destroy(comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (comm != ICET_COMM_NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm->Destroy(comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define MPI_COMM (*((MPI_Comm *)self->data))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static IceTCommunicator Duplicate(IceTCommunicator self)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTCommunicator MPIDuplicate(IceTCommunicator self)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (self != ICET_COMM_NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return icetCreateMPICommunicator(MPI_COMM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_COMM_NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTCommunicator MPISubset(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt32 *ranks)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return icetCreateMPICommunicator(MPI_COMM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MPI_Group original_group;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MPI_Group subset_group;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MPI_Comm subset_comm;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommunicator result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MPI_Comm_group(MPI_COMM, &original_group);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MPI_Group_incl(original_group, count, (IceTInt32 *)ranks, &subset_group);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MPI_Comm_create(MPI_COMM, subset_group, &subset_comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = icetCreateMPICommunicator(subset_comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (subset_comm != MPI_COMM_NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MPI_Comm_free(&subset_comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MPI_Group_free(&subset_group);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MPI_Group_free(&original_group);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Destroy(IceTCommunicator self)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPIDestroy(IceTCommunicator self)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Comm_free((MPI_Comm *)self->data);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ free(self->data);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ free(self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Barrier(IceTCommunicator self)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPIBarrier(IceTCommunicator self)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Barrier(MPI_COMM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -275,41 +321,41 @@ static void Barrier(IceTCommunicator self)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Send(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int tag)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPISend(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int tag)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Datatype mpidatatype;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONVERT_DATATYPE(datatype, mpidatatype);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Send((void *)buf, count, mpidatatype, dest, tag, MPI_COMM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Recv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int src,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int tag)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPIRecv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int src,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int tag)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Datatype mpidatatype;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONVERT_DATATYPE(datatype, mpidatatype);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Recv(buf, count, mpidatatype, src, tag, MPI_COMM, MPI_STATUS_IGNORE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Sendrecv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum sendtype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int sendtag,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void *recvbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int recvcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum recvtype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int src,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int recvtag)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPISendrecv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum sendtype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int sendtag,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *recvbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int recvcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum recvtype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int src,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int recvtag)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Datatype mpisendtype;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Datatype mpirecvtype;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -321,12 +367,12 @@ static void Sendrecv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_STATUS_IGNORE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Gather(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void *recvbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int root)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPIGather(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *recvbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int root)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Datatype mpitype;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONVERT_DATATYPE(datatype, mpitype);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -350,14 +396,14 @@ static void Gather(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_COMM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Gatherv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void *recvbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const int *recvcounts,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const int *recvoffsets,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int root)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPIGatherv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *recvbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const int *recvcounts,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const int *recvoffsets,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int root)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Datatype mpitype;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONVERT_DATATYPE(datatype, mpitype);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -382,11 +428,11 @@ static void Gatherv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ root, MPI_COMM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Allgather(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void *recvbuf)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPIAllgather(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *recvbuf)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Datatype mpitype;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONVERT_DATATYPE(datatype, mpitype);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -410,11 +456,11 @@ static void Allgather(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_COMM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Alltoall(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void *recvbuf)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPIAlltoall(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const void *sendbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int sendcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *recvbuf)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Datatype mpitype;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONVERT_DATATYPE(datatype, mpitype);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -424,12 +470,12 @@ static void Alltoall(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_COMM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static IceTCommRequest Isend(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int tag)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTCommRequest MPIIsend(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int tag)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTCommRequest icet_request;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Request mpi_request;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -445,12 +491,12 @@ static IceTCommRequest Isend(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return icet_request;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static IceTCommRequest Irecv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int src,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int tag)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTCommRequest MPIIrecv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum datatype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int src,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int tag)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTCommRequest icet_request;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Request mpi_request;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -466,7 +512,7 @@ static IceTCommRequest Irecv(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return icet_request;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void Waitone(IceTCommunicator self, IceTCommRequest *icet_request)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MPIWaitone(IceTCommunicator self, IceTCommRequest *icet_request)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Request mpi_request;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -483,8 +529,8 @@ static void Waitone(IceTCommunicator self, IceTCommRequest *icet_request)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *icet_request = ICET_COMM_REQUEST_NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static int Waitany(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int count, IceTCommRequest *array_of_requests)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int MPIWaitany(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int count, IceTCommRequest *array_of_requests)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Request *mpi_requests;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int idx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -514,14 +560,14 @@ static int Waitany(IceTCommunicator self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return idx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static int Comm_size(IceTCommunicator self)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int MPIComm_size(IceTCommunicator self)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Comm_size(MPI_COMM, &size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static int Comm_rank(IceTCommunicator self)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int MPIComm_rank(IceTCommunicator self)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MPI_Comm_rank(MPI_COMM, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/gl/CMakeLists.txt src/gl/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 9ee69e0..beae65d 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/gl/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/gl/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -6,12 +6,20 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(ICET_GL_SRCS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gl_state.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gl_draw.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gl_image.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ gl_state.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ gl_draw.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ gl_image.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++SET(ICET_GL_HEADERS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../include/IceTGL.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-ICET_ADD_LIBRARY(IceTGL ${ICET_GL_SRCS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ICET_ADD_LIBRARY(IceTGL ${ICET_GL_SRCS} ${ICET_GL_HEADERS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++SET_SOURCE_FILES_PROPERTIES(${ICET_GL_HEADERS}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PROPERTIES HEADER_FILE_ONLY TRUE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TARGET_LINK_LIBRARIES(IceTGL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTCore
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/ice-t/CMakeLists.txt src/ice-t/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index ebb1462..1aef689 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/ice-t/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/ice-t/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -6,32 +6,61 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(ICET_SRCS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- porting.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- context.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- state.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- diagnostics.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- communication.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- tiles.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- timing.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- matrix.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- projections.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- draw.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- image.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ../strategies/common.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ../strategies/select.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ../strategies/direct.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ../strategies/sequential.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ../strategies/split.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ../strategies/reduce.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ../strategies/vtree.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ../strategies/bswap.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ../strategies/radixk.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ../strategies/tree.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ../strategies/automatic.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-ICET_ADD_LIBRARY(IceTCore ${ICET_SRCS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ porting.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ context.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ state.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ diagnostics.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ communication.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tiles.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ matrix.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ projections.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ draw.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../strategies/common.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../strategies/select.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../strategies/direct.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../strategies/sequential.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../strategies/split.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../strategies/reduce.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../strategies/vtree.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../strategies/bswap.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../strategies/radixk.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../strategies/radixkr.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../strategies/tree.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../strategies/automatic.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++SET(ICET_HEADERS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../include/IceT.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../include/IceTDevCommunication.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../include/IceTDevContext.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../include/IceTDevDiagnostics.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../include/IceTDevGLImage.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../include/IceTDevImage.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../include/IceTDevMatrix.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../include/IceTDevPorting.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../include/IceTDevProjections.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../include/IceTDevState.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../include/IceTDevStrategySelect.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../include/IceTDevTiming.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cc_composite_func_body.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cc_composite_template_body.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ compress_func_body.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ compress_template_body.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ decompress_func_body.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ decompress_template_body.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../strategies/common.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ICET_ADD_LIBRARY(IceTCore ${ICET_SRCS} ${ICET_HEADERS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++SET_SOURCE_FILES_PROPERTIES(${ICET_HEADERS}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PROPERTIES HEADER_FILE_ONLY TRUE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IF (UNIX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Depend on the math library under Unix.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/ice-t/communication.c src/ice-t/communication.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 05e558f..7370e83 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/ice-t/communication.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/ice-t/communication.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -34,6 +34,12 @@ IceTCommunicator icetCommDuplicate()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return comm->Duplicate(comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IceTCommunicator icetCommSubset(int count, const IceTInt32 *ranks)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommunicator comm = icetGetCommunicator();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return comm->Subset(comm, count, ranks);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void icetCommBarrier()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTCommunicator comm = icetGetCommunicator();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/ice-t/compress_func_body.h src/ice-t/compress_func_body.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index e89b172..8a4c87b 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/ice-t/compress_func_body.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/ice-t/compress_func_body.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -118,7 +118,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (_composite_mode == ICET_COMPOSITE_MODE_Z_BUFFER) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (_depth_format == ICET_IMAGE_DEPTH_FLOAT) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Use Z buffer for active pixel testing. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const IceTFloat *_depth = icetImageGetDepthf(INPUT_IMAGE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTFloat *_depth = icetImageGetDepthcf(INPUT_IMAGE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef OFFSET
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _depth += OFFSET;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -129,7 +129,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef REGION
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType _region_count = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- _color = icetImageGetColorui(INPUT_IMAGE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _color = icetImageGetColorcui(INPUT_IMAGE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef OFFSET
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _color += OFFSET;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -171,7 +171,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef REGION
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType _region_count = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- _color = icetImageGetColorf(INPUT_IMAGE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _color = icetImageGetColorcf(INPUT_IMAGE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef OFFSET
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _color += 4*(OFFSET);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -265,7 +265,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef REGION
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType _region_count = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- _color = icetImageGetColorui(INPUT_IMAGE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _color = icetImageGetColorcui(INPUT_IMAGE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef OFFSET
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _color += OFFSET;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -303,7 +303,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef REGION
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType _region_count = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- _color = icetImageGetColorf(INPUT_IMAGE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _color = icetImageGetColorcf(INPUT_IMAGE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef OFFSET
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _color += 4*(OFFSET);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/ice-t/decompress_func_body.h src/ice-t/decompress_func_body.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index bf312c4..5631230 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/ice-t/decompress_func_body.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/ice-t/decompress_func_body.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -75,21 +75,31 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _depth_format = icetSparseImageGetDepthFormat(INPUT_SPARSE_IMAGE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _pixel_count = icetSparseImageGetNumPixels(INPUT_SPARSE_IMAGE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if ( (_color_format != icetImageGetColorFormat(OUTPUT_IMAGE))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- || (_depth_format != icetImageGetDepthFormat(OUTPUT_IMAGE))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (_color_format != icetImageGetColorFormat(OUTPUT_IMAGE)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Input/output buffers have different color formats.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (_depth_format != icetImageGetDepthFormat(OUTPUT_IMAGE)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Input/output buffers have different depth formats.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef PIXEL_COUNT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- || (_pixel_count != PIXEL_COUNT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (_pixel_count != PIXEL_COUNT) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Unexpected input pixel count.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- || (_pixel_count != icetImageGetNumPixels(OUTPUT_IMAGE))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (_pixel_count != icetImageGetNumPixels(OUTPUT_IMAGE)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Unexpected input pixel count.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef OFFSET
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- || (_pixel_count > icetImageGetNumPixels(OUTPUT_IMAGE) - OFFSET)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetRaiseError("Input/output buffers do not agree for decompression.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (_pixel_count > icetImageGetNumPixels(OUTPUT_IMAGE) - OFFSET) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Offset pixels outside range of output image.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (_composite_mode == ICET_COMPOSITE_MODE_Z_BUFFER) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (_depth_format == ICET_IMAGE_DEPTH_FLOAT) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/ice-t/diagnostics.c src/ice-t/diagnostics.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 354019c..775d280 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/ice-t/diagnostics.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/ice-t/diagnostics.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -20,6 +20,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <signal.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef WIN32
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <unistd.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTEnum currentError = ICET_NO_ERROR;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTEnum currentLevel;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -125,5 +129,9 @@ void icetDiagnostics(IceTBitField mask)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void icetDebugBreak(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("Waiting for debugger in process %d\n", getpid());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sleep(100);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ raise(SIGSEGV);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/ice-t/draw.c src/ice-t/draw.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index e8e3cfe..deedf90 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/ice-t/draw.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/ice-t/draw.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -13,6 +13,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevDiagnostics.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevImage.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevMatrix.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceTDevProjections.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevState.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevStrategySelect.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevTiming.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -161,6 +162,43 @@ void icetDataReplicationGroupColor(IceTInt color)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetDataReplicationGroup(size, mygroup);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void drawUseMatrices(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTDouble *modelview_matrix)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((projection_matrix != NULL) && (modelview_matrix != NULL)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStateSetDoublev(ICET_PROJECTION_MATRIX, 16, projection_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStateSetDoublev(ICET_MODELVIEW_MATRIX, 16, modelview_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble identity[16];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetMatrixIdentity(identity);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (projection_matrix == NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStateSetDoublev(ICET_PROJECTION_MATRIX, 16, identity);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseWarning("Drawing with a projection matrix but no "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "modelview matrix. Confused on what to do.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStateSetDoublev(ICET_PROJECTION_MATRIX, 16, projection_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (modelview_matrix == NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStateSetDoublev(ICET_MODELVIEW_MATRIX, 16, identity);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseWarning("Drawing with a modelview matrix but no "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "projection matrix. Confused on what to do.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStateSetDoublev(ICET_MODELVIEW_MATRIX, 16, projection_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (*icetUnsafeStateGetInteger(ICET_NUM_BOUNDING_VERTS) != 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseWarning(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "Geometry bounds were given (with icetBoundingBox or icetBoundingVertices)\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "but projection matrices not given to icetCompositeImage. Clearing out the\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "bounding information. (Use icetBoundingVertices(0, ICET_VOID, 0, 0, NULL)\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "to avoid this error.)",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetBoundingVertices(0, ICET_VOID, 0, 0, NULL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTFloat black[] = {0.0f, 0.0f, 0.0f, 0.0f};
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static void drawUseBackgroundColor(const IceTFloat *background_color)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -581,30 +619,37 @@ static void drawProjectBounds(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sizeof(IceTBoolean)*num_tiles);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (num_bounding_verts < 1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* User never set bounding vertices. Assume image covers all tiles. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTInt i;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for (i = 0; i < num_tiles; i++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- contained_list[i] = i;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- contained_mask[i] = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* User never set bounding vertices. Assume image covers global
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * viewport. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetIntegerv(ICET_GLOBAL_VIEWPORT, contained_viewport);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ znear = -1.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ zfar = 1.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- num_contained = num_tiles;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Figure out how the geometry projects onto the display. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ drawFindContainedViewport(contained_viewport, &znear, &zfar);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Now use this information to figure out which tiles need to be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- drawn. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- drawDetermineContainedTiles(contained_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- znear,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- zfar,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- contained_list,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- contained_mask,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- &num_contained);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ( icetUnsafeStateGetBoolean(ICET_PRE_RENDERED)[0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ && (icetStateGetNumEntries(ICET_RENDERED_VIEWPORT) == 4) ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* If we are using a pre-rendered image (from icetCompositeImage) and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * a valid pixels viewport was given, then clip the current contained
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * viewport with that one. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt *rendered_viewport =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetUnsafeStateGetInteger(ICET_RENDERED_VIEWPORT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetIntersectViewports(rendered_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ contained_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ contained_viewport);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Now use this information to figure out which tiles need to be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ drawn. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ drawDetermineContainedTiles(contained_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ znear,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ zfar,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ contained_list,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ contained_mask,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ &num_contained);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetRaiseDebug4("contained_viewport = %d %d %d %d",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (int)contained_viewport[0], (int)contained_viewport[1],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (int)contained_viewport[2], (int)contained_viewport[3]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -632,6 +677,18 @@ static void drawCollectTileInformation(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt num_tiles;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum strategy;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetEnumv(ICET_STRATEGY, &strategy);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* This function performs allgathers to collect information about
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * all tiles on all processes, which IceT strategies need to cull
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * out unused tiles and set up communication patterns. However,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * the sequential strategy ignores this information and just uses
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * all processes for all tiles, so we can skip this step. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (strategy == ICET_STRATEGY_SEQUENTIAL) { return; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetIntegerv(ICET_NUM_PROCESSES, &num_proc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetIntegerv(ICET_NUM_TILES, &num_tiles);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -680,7 +737,8 @@ static IceTImage drawInvokeStrategy(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt valid_tile;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetPointerv(ICET_DRAW_FUNCTION, &value);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (value == NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ( (value == NULL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ && !icetUnsafeStateGetBoolean(ICET_PRE_RENDERED)[0]) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetRaiseError("Drawing function not set. Call icetDrawCallback.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_INVALID_OPERATION);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return icetImageNull();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -728,9 +786,9 @@ static IceTImage drawInvokeStrategy(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-IceTImage icetDrawFrame(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const IceTDouble *modelview_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const IceTFloat *background_color)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTImage drawDoFrame(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTDouble *modelview_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTFloat *background_color)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt frame_count;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTImage image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -739,8 +797,6 @@ IceTImage icetDrawFrame(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble compose_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble total_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetRaiseDebug("In icetDrawFrame");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTBoolean isDrawing;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetBooleanv(ICET_IS_DRAWING_FRAME, &isDrawing);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -754,8 +810,7 @@ IceTImage icetDrawFrame(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetStateResetTiming();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetTimingDrawFrameBegin();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetStateSetDoublev(ICET_PROJECTION_MATRIX, 16, projection_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetStateSetDoublev(ICET_MODELVIEW_MATRIX, 16, modelview_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ drawUseMatrices(projection_matrix, modelview_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ drawUseBackgroundColor(background_color);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -765,21 +820,7 @@ IceTImage icetDrawFrame(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ drawProjectBounds();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum strategy;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetGetEnumv(ICET_STRATEGY, &strategy);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* drawCollectTileInformation does an allgather to get information
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * about the tiles in other processes. These variables are
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * ICET_ALL_CONTAINED_TILES_MASKS, ICET_TILE_CONTRIB_COUNTS, and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * ICET_TOTAL_IMAGE_COUNT. However, the sequential strategy ignores
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * this information and just uses all processes for all tiles. When
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * compositing a single tile, this is a fine strategy and we can save
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * a significant proportion of frame time by skipping this step. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (strategy != ICET_STRATEGY_SEQUENTIAL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- drawCollectTileInformation();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ drawCollectTileInformation();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt tile_displayed;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -819,3 +860,42 @@ IceTImage icetDrawFrame(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IceTImage icetDrawFrame(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTDouble *modelview_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTFloat *background_color)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseDebug("In icetDrawFrame");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStateSetBoolean(ICET_PRE_RENDERED, ICET_FALSE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return drawDoFrame(projection_matrix, modelview_matrix, background_color);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IceTImage icetCompositeImage(const IceTVoid *color_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTVoid *depth_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt *valid_pixels_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTDouble *modelview_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTFloat *background_color)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt global_viewport[4];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseDebug("In icetCompositeImage");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_GLOBAL_VIEWPORT, global_viewport);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStateSetBoolean(ICET_PRE_RENDERED, ICET_TRUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetStatePointerImage(ICET_RENDER_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ global_viewport[2],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ global_viewport[3],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ depth_buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (valid_pixels_viewport) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStateSetIntegerv(ICET_RENDERED_VIEWPORT, 4, valid_pixels_viewport);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStateSetIntegerv(ICET_RENDERED_VIEWPORT, 0, NULL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return drawDoFrame(projection_matrix, modelview_matrix, background_color);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/ice-t/image.c src/ice-t/image.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 941e2e9..cd80174 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/ice-t/image.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/ice-t/image.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -21,6 +21,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <string.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_IMAGE_MAGIC_NUM (IceTEnum)0x004D5000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ICET_IMAGE_POINTERS_MAGIC_NUM (IceTEnum)0x004D5100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_SPARSE_IMAGE_MAGIC_NUM (IceTEnum)0x004D6000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_IMAGE_MAGIC_NUM_INDEX 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -46,8 +47,10 @@ typedef IceTUnsignedInt32 IceTRunLengthType;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static void ICET_TEST_IMAGE_HEADER(IceTImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!icetImageIsNull(image)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if ( ICET_IMAGE_HEADER(image)[ICET_IMAGE_MAGIC_NUM_INDEX]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- != ICET_IMAGE_MAGIC_NUM ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum magic_num =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_IMAGE_HEADER(image)[ICET_IMAGE_MAGIC_NUM_INDEX];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ( (magic_num != ICET_IMAGE_MAGIC_NUM)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ && (magic_num != ICET_IMAGE_POINTERS_MAGIC_NUM) ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetRaiseError("Detected invalid image header.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -140,7 +143,7 @@ static void icetSparseImageSetActualSize(IceTSparseImage image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * to the last run length. This parameter is optional. If set to NULL,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * it is assumed that out_data_p will initially point to a run length.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * This parameter is ignored if out_data_p is NULL.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static void icetSparseImageScanPixels(const IceTVoid **in_data_p,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType *inactive_before_p,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType *active_till_next_runl_p,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -188,6 +191,18 @@ static void icetSparseImageSplitChoosePartitions(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType first_offset,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType *offsets);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* This function is used to get the image for a tile. It will either render
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ the tile on demand (with renderTile) or get the image from a pre-rendered
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image (with prerenderedTile). The screen_viewport is set to the region of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ valid pixels in the returned image. The tile_viewport gives the region
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ where the pixels reside in the tile. (The width and height of the two
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ viewports will be the same.) Pixels outside of these viewports are
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ undefined. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTImage generateTile(int tile,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *screen_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *target_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTImage tile_buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Renders the geometry for a tile and returns an image of the rendered data.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ If IceT determines that it is most efficient to render the data directly to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the tile projection, then screen_viewport and tile_viewport will be set to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -196,15 +211,23 @@ static void icetSparseImageSplitChoosePartitions(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cleared to the background before used. If tile_buffer is not a null image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ that image will be used to render and be returned. If IceT determines that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ it is most efficient to render a projection that does not exactly fit a tile,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- tile_buffer will be ignored an image with an internal buffer will be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tile_buffer will be ignored and image with an internal buffer will be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ returned. screen_viewport will give the offset and dimensions of the valid
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pixels in the returned buffer. tile_viewport gives the offset and dimensions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- where these pixels reside in the tile. (The dimensions for both will be the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- same.) As before, pixels outside of these viewports are undefined. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ where these pixels reside in the tile. (The width and height for both will
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ be the same.) As before, pixels outside of these viewports are undefined. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTImage renderTile(int tile,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt *screen_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTInt *tile_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *target_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTImage tile_buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Returns the pre-rendered image, the region of valid pixels in the tile in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ screen_viewport, and the region where the pixels reside in the tile in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tile_viewport. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTImage prerenderedTile(int tile,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *screen_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *target_viewport);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Gets an image buffer attached to this context. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTImage getRenderBuffer(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -254,6 +277,12 @@ IceTSizeType icetImageBufferSizeType(IceTEnum color_format,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ + width*height*(color_pixel_size + depth_pixel_size) );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IceTSizeType icetImagePointerBufferSize(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ( ICET_IMAGE_DATA_START_INDEX*sizeof(IceTUInt)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ + 2*(sizeof(const IceTVoid *)) );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType icetSparseImageBufferSize(IceTSizeType width, IceTSizeType height)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTEnum color_format, depth_format;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -309,6 +338,28 @@ IceTImage icetGetStateBufferImage(IceTEnum pname,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return icetImageAssignBuffer(buffer, width, height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IceTImage icetRetrieveStateImage(IceTEnum pname)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return icetImageUnpackageFromReceive(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (IceTVoid *)icetUnsafeStateGetBuffer(pname));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IceTImage icetGetStatePointerImage(IceTEnum pname,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType height,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTVoid *color_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTVoid *depth_buffer)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTVoid *buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType buffer_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ buffer_size = icetImagePointerBufferSize();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ buffer = icetGetStateBuffer(pname, buffer_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return icetImagePointerAssignBuffer(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ buffer, width, height, color_buffer, depth_buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTImage icetImageAssignBuffer(IceTVoid *buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType height)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -357,6 +408,62 @@ IceTImage icetImageAssignBuffer(IceTVoid *buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IceTImage icetImagePointerAssignBuffer(IceTVoid *buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType height,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTVoid *color_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTVoid *depth_buffer)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* This is a bit hacky, but most of the entries for regular images and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * pointer images are the same. Use that function to fill in most of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * the entries and fix those that are different. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTImage image = icetImageAssignBuffer(buffer, width, height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *header = ICET_IMAGE_HEADER(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Our magic number is different. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ header[ICET_IMAGE_MAGIC_NUM_INDEX] = ICET_IMAGE_POINTERS_MAGIC_NUM;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* It is invalid to use this type of image as a single buffer. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ header[ICET_IMAGE_ACTUAL_BUFFER_SIZE_INDEX] = -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Check that the image buffers make sense. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (icetImageGetColorFormat(image) == ICET_IMAGE_COLOR_NONE) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (color_buffer != NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "Given a color buffer when color format is set to none.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (color_buffer == NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "Not given a color buffer when color format requires one.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (icetImageGetDepthFormat(image) == ICET_IMAGE_DEPTH_NONE) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (depth_buffer != NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "Given a depth buffer when depth format is set to none.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (depth_buffer == NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "Not given a depth buffer when depth format requires one.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTVoid **data = ICET_IMAGE_DATA(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ data[0] = color_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ data[1] = depth_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTImage icetImageNull(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTImage image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -584,11 +691,14 @@ void icetImageSetDimensions(IceTImage image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_IMAGE_HEADER(image)[ICET_IMAGE_WIDTH_INDEX] = (IceTInt)width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_IMAGE_HEADER(image)[ICET_IMAGE_HEIGHT_INDEX] = (IceTInt)height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ICET_IMAGE_HEADER(image)[ICET_IMAGE_ACTUAL_BUFFER_SIZE_INDEX]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- = (IceTInt)icetImageBufferSizeType(icetImageGetColorFormat(image),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetImageGetDepthFormat(image),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ( ICET_IMAGE_HEADER(image)[ICET_IMAGE_MAGIC_NUM_INDEX]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ == ICET_IMAGE_MAGIC_NUM) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_IMAGE_HEADER(image)[ICET_IMAGE_ACTUAL_BUFFER_SIZE_INDEX]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ = (IceTInt)icetImageBufferSizeType(icetImageGetColorFormat(image),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetImageGetDepthFormat(image),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void icetSparseImageSetDimensions(IceTSparseImage image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -638,12 +748,29 @@ const IceTVoid *icetImageGetColorConstVoid(const IceTImage image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *pixel_size = colorPixelSize(color_format);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return ICET_IMAGE_DATA(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ switch (ICET_IMAGE_HEADER(image)[ICET_IMAGE_MAGIC_NUM_INDEX]) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_IMAGE_MAGIC_NUM:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_IMAGE_DATA(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_IMAGE_POINTERS_MAGIC_NUM:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ((const IceTVoid **)ICET_IMAGE_DATA(image))[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Detected invalid image header.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTVoid *icetImageGetColorVoid(IceTImage image, IceTSizeType *pixel_size)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const IceTVoid *const_buffer = icetImageGetColorConstVoid(image, pixel_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Raise an exception for images made of pointers, which we set as constant
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * since all internally made pointers are single buffers. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ( ICET_IMAGE_HEADER(image)[ICET_IMAGE_MAGIC_NUM_INDEX]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ == ICET_IMAGE_POINTERS_MAGIC_NUM) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Images of pointers are for reading only.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* This const cast is OK because we actually got the pointer from a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ non-const image. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return (IceTVoid *)const_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -663,11 +790,15 @@ const IceTUByte *icetImageGetColorcub(const IceTImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTUByte *icetImageGetColorub(IceTImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const IceTUByte *const_buffer = icetImageGetColorcub(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum color_format = icetImageGetColorFormat(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* This const cast is OK because we actually got the pointer from a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- non-const image. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return (IceTUByte *)const_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (color_format != ICET_IMAGE_COLOR_RGBA_UBYTE) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Color format is not of type ubyte.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_INVALID_OPERATION);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return icetImageGetColorVoid(image, NULL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const IceTUInt *icetImageGetColorcui(const IceTImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -691,41 +822,62 @@ const IceTFloat *icetImageGetColorcf(const IceTImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTFloat *icetImageGetColorf(IceTImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const IceTFloat *const_buffer = icetImageGetColorcf(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum color_format = icetImageGetColorFormat(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* This const cast is OK because we actually got the pointer from a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- non-const image. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return (IceTFloat *)const_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (color_format != ICET_IMAGE_COLOR_RGBA_FLOAT) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Color format is not of type float.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_INVALID_OPERATION);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return icetImageGetColorVoid(image, NULL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const IceTVoid *icetImageGetDepthConstVoid(const IceTImage image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType *pixel_size)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTEnum color_format = icetImageGetColorFormat(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTSizeType color_format_bytes;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const IceTByte *image_data_pointer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (pixel_size) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTEnum depth_format = icetImageGetDepthFormat(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *pixel_size = depthPixelSize(depth_format);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- color_format_bytes = ( icetImageGetNumPixels(image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * colorPixelSize(color_format) );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ switch (ICET_IMAGE_HEADER(image)[ICET_IMAGE_MAGIC_NUM_INDEX]) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_IMAGE_MAGIC_NUM:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType color_format_bytes = ( icetImageGetNumPixels(image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * colorPixelSize(color_format) );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Cast to IceTByte to ensure pointer arithmetic is correct. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- image_data_pointer = (const IceTByte*)ICET_IMAGE_DATA(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Cast to IceTByte to ensure pointer arithmetic is correct. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTByte *image_data_pointer =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (const IceTByte*)ICET_IMAGE_DATA(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return image_data_pointer + color_format_bytes;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return image_data_pointer + color_format_bytes;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_IMAGE_POINTERS_MAGIC_NUM:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ((const IceTVoid **)ICET_IMAGE_DATA(image))[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Detected invalid image header.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTVoid *icetImageGetDepthVoid(IceTImage image, IceTSizeType *pixel_size)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const IceTVoid *const_buffer =icetImageGetDepthConstVoid(image, pixel_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Raise an exception for images made of pointers, which we set as constant
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * since all internally made pointers are single buffers. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ( ICET_IMAGE_HEADER(image)[ICET_IMAGE_MAGIC_NUM_INDEX]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ == ICET_IMAGE_POINTERS_MAGIC_NUM) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Images of pointers are for reading only.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* This const cast is OK because we actually got the pointer from a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ non-const image. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return (IceTVoid *)const_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (IceTVoid *)const_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const IceTFloat *icetImageGetDepthcf(const IceTImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -741,12 +893,15 @@ const IceTFloat *icetImageGetDepthcf(const IceTImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTFloat *icetImageGetDepthf(IceTImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const IceTFloat *const_buffer = icetImageGetDepthcf(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum depth_format = icetImageGetDepthFormat(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* This const cast is OK because we actually got the pointer from a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- non-const image. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return (IceTFloat *)const_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (depth_format != ICET_IMAGE_DEPTH_FLOAT) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Depth format is not of type float.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_INVALID_OPERATION);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return icetImageGetDepthVoid(image, NULL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void icetImageCopyColorub(const IceTImage image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -889,7 +1044,7 @@ void icetImageCopyPixels(const IceTImage in_image, IceTSizeType in_offset,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const IceTByte *in_colors; /* Use IceTByte for pointer arithmetic */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTByte *out_colors;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType pixel_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- in_colors = icetImageGetColorVoid(in_image, &pixel_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ in_colors = icetImageGetColorConstVoid(in_image, &pixel_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ out_colors = icetImageGetColorVoid(out_image, NULL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ memcpy(out_colors + pixel_size*out_offset,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ in_colors + pixel_size*in_offset,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -900,7 +1055,7 @@ void icetImageCopyPixels(const IceTImage in_image, IceTSizeType in_offset,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const IceTByte *in_depths; /* Use IceTByte for pointer arithmetic */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTByte *out_depths;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType pixel_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- in_depths = icetImageGetDepthVoid(in_image, &pixel_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ in_depths = icetImageGetDepthConstVoid(in_image, &pixel_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ out_depths = icetImageGetDepthVoid(out_image, NULL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ memcpy(out_depths + pixel_size*out_offset,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ in_depths + pixel_size*in_offset,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -933,7 +1088,7 @@ void icetImageCopyRegion(const IceTImage in_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (color_format != ICET_IMAGE_COLOR_NONE) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType pixel_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Use IceTByte for byte-based pointer arithmetic. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const IceTByte *src = icetImageGetColorVoid(in_image, &pixel_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTByte *src = icetImageGetColorConstVoid(in_image, &pixel_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTByte *dest = icetImageGetColorVoid(out_image, &pixel_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -955,7 +1110,7 @@ void icetImageCopyRegion(const IceTImage in_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (depth_format != ICET_IMAGE_DEPTH_NONE) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType pixel_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Use IceTByte for byte-based pointer arithmetic. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const IceTByte *src = icetImageGetDepthVoid(in_image, &pixel_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTByte *src = icetImageGetDepthConstVoid(in_image, &pixel_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTByte *dest = icetImageGetDepthVoid(out_image, &pixel_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1096,6 +1251,14 @@ void icetImagePackageForSend(IceTImage image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *buffer = image.opaque_internals;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *size = ICET_IMAGE_HEADER(image)[ICET_IMAGE_ACTUAL_BUFFER_SIZE_INDEX];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (*size < 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Images of pointers have less than zero size to alert they are not
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * real buffers. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "Attempting to package an image that is not a single buffer.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (*size != icetImageBufferSizeType(icetImageGetColorFormat(image),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetImageGetDepthFormat(image),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetImageGetWidth(image),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1108,13 +1271,15 @@ void icetImagePackageForSend(IceTImage image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTImage icetImageUnpackageFromReceive(IceTVoid *buffer)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTImage image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum magic_number;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTEnum color_format, depth_format;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ image.opaque_internals = buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Check the image for validity. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if ( ICET_IMAGE_HEADER(image)[ICET_IMAGE_MAGIC_NUM_INDEX]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- != ICET_IMAGE_MAGIC_NUM ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ magic_number = ICET_IMAGE_HEADER(image)[ICET_IMAGE_MAGIC_NUM_INDEX];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ( (magic_number != ICET_IMAGE_MAGIC_NUM)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ && (magic_number != ICET_IMAGE_POINTERS_MAGIC_NUM) ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetRaiseError("Invalid image buffer: no magic number.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ image.opaque_internals = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1140,13 +1305,26 @@ IceTImage icetImageUnpackageFromReceive(IceTVoid *buffer)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if ( icetImageBufferSizeType(color_format, depth_format,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetImageGetWidth(image),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetImageGetHeight(image))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- != ICET_IMAGE_HEADER(image)[ICET_IMAGE_ACTUAL_BUFFER_SIZE_INDEX] ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetRaiseError("Inconsistent sizes in image data.", ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- image.opaque_internals = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (magic_number == ICET_IMAGE_MAGIC_NUM) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType buffer_size =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_IMAGE_HEADER(image)[ICET_IMAGE_ACTUAL_BUFFER_SIZE_INDEX];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ( icetImageBufferSizeType(color_format, depth_format,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetImageGetWidth(image),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetImageGetHeight(image))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ != buffer_size ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Inconsistent sizes in image data.", ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image.opaque_internals = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType buffer_size =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_IMAGE_HEADER(image)[ICET_IMAGE_ACTUAL_BUFFER_SIZE_INDEX];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (buffer_size != -1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Size information not consistent with image type.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image.opaque_internals = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* The source may have used a bigger buffer than allocated here at the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1261,7 +1439,7 @@ static void icetSparseImageScanPixels(const IceTVoid **in_data_p,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ out_data += RUN_LENGTH_SIZE; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ INACTIVE_RUN_LENGTH(last_out_run_length) = 0; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ACTIVE_RUN_LENGTH(last_out_run_length) = 0; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (out_data_p != NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ out_data = *out_data_p;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1656,6 +1834,8 @@ void icetSparseImageInterlace(const IceTSparseImage in_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetTimingInterlaceBegin();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pixel_size = colorPixelSize(color_format) + depthPixelSize(depth_format);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1746,6 +1926,8 @@ void icetSparseImageInterlace(const IceTSparseImage in_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetSparseImageSetActualSize(out_image, out_data);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetTimingInterlaceEnd();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType icetGetInterlaceOffset(IceTInt partition_index,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1763,6 +1945,8 @@ IceTSizeType icetGetInterlaceOffset(IceTInt partition_index,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetTimingInterlaceBegin();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lower_partition_size = original_image_size/eventual_num_partitions;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ remaining_pixels = original_image_size%eventual_num_partitions;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1782,6 +1966,7 @@ IceTSizeType icetGetInterlaceOffset(IceTInt partition_index,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (interlaced_partition_idx == partition_index) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Found any partitions before this one. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetTimingInterlaceEnd();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return offset;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1795,6 +1980,7 @@ IceTSizeType icetGetInterlaceOffset(IceTInt partition_index,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Should never get here. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetRaiseError("Could not find partition index.", ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetTimingInterlaceEnd();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1877,7 +2063,8 @@ void icetGetTileImage(IceTInt tile, IceTImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ height = viewports[4*tile+3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetImageSetDimensions(image, width, height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- rendered_image = renderTile(tile, screen_viewport, target_viewport, image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ rendered_image =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ generateTile(tile, screen_viewport, target_viewport, image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetTimingBufferReadBegin();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1887,7 +2074,7 @@ void icetGetTileImage(IceTInt tile, IceTImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || (screen_viewport[1] != target_viewport[1])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || (screen_viewport[2] != target_viewport[2])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || (screen_viewport[3] != target_viewport[3]) ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetRaiseError("Inconsistent values returned from renderTile.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Inconsistent values returned from generateTile.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1914,8 +2101,8 @@ void icetGetCompressedTileImage(IceTInt tile, IceTSparseImage compressed_image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ height = viewports[4*tile+3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetSparseImageSetDimensions(compressed_image, width, height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- raw_image = renderTile(tile, screen_viewport, target_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetImageNull());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ raw_image = generateTile(tile, screen_viewport, target_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetImageNull());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ((target_viewport[2] < 1) || (target_viewport[3] < 1)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Tile empty. Just clear result. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2297,6 +2484,20 @@ void icetClearImageTrueBackground(IceTImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetStateSetInteger(ICET_BACKGROUND_COLOR_WORD, original_background_word);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTImage generateTile(int tile,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *screen_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *target_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTImage tile_buffer)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean use_prerender;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetBooleanv(ICET_PRE_RENDERED, &use_prerender);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (use_prerender) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return prerenderedTile(tile, screen_viewport, target_viewport);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return renderTile(tile, screen_viewport, target_viewport, tile_buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTImage renderTile(int tile,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt *screen_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt *target_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2340,12 +2541,17 @@ static IceTImage renderTile(int tile,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || (contained_viewport[1] > tile_viewport[1] + tile_viewport[3]) ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Case 0: geometry completely outside tile. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetRaiseDebug("Case 0: geometry completely outside tile.");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- screen_viewport[0] = target_viewport[0] = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- screen_viewport[1] = target_viewport[1] = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- screen_viewport[2] = target_viewport[2] = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- screen_viewport[3] = target_viewport[3] = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Don't bother to render. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return tile_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ readback_viewport[0] = screen_viewport[0] = target_viewport[0] = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ readback_viewport[1] = screen_viewport[1] = target_viewport[1] = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ readback_viewport[2] = screen_viewport[2] = target_viewport[2] = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ readback_viewport[3] = screen_viewport[3] = target_viewport[3] = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!icetIsEnabled(ICET_RENDER_EMPTY_IMAGES)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Don't bother to render. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return tile_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Give renderer right projection even if we ignore the result. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetProjectTile(tile, projection_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if ( (contained_viewport[0] >= tile_viewport[0])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && (contained_viewport[1] >= tile_viewport[1])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2522,42 +2728,47 @@ static IceTImage renderTile(int tile,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return render_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-/* This function is full of hackery. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTImage prerenderedTile(int tile,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *screen_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *target_viewport)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt *contained_viewport;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt *tile_viewport;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseDebug1("Getting viewport for tile %d in prerendered image", tile);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ contained_viewport = icetUnsafeStateGetInteger(ICET_CONTAINED_VIEWPORT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tile_viewport = icetUnsafeStateGetInteger(ICET_TILE_VIEWPORTS) + 4*tile;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* The screen viewport is the intersection of the tile viewport with the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * contained viewport. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetIntersectViewports(tile_viewport, contained_viewport, screen_viewport);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* The target viewport is the same width-height as the screen viewport.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * It is offset by the same amount the screen viewport is offset from the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * tile viewport. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ target_viewport[0] = screen_viewport[0] - tile_viewport[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ target_viewport[1] = screen_viewport[1] - tile_viewport[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ target_viewport[2] = screen_viewport[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ target_viewport[3] = screen_viewport[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return icetRetrieveStateImage(ICET_RENDER_BUFFER);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTImage getRenderBuffer(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Check to see if we are in the same frame as the last time we returned
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ this buffer. In that case, just restore the buffer because it still has
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the image we need. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if ( icetStateGetTime(ICET_RENDER_BUFFER_HOLD)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ( icetStateGetTime(ICET_RENDER_BUFFER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ > icetStateGetTime(ICET_IS_DRAWING_FRAME) ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* A little bit of hackery: this assumes that a buffer initialized is the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- same one returned from icetImagePackageForSend. It (currently)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- does. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTVoid *buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetRaiseDebug("Last render should still be good.");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetGetPointerv(ICET_RENDER_BUFFER_HOLD, &buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return icetImageUnpackageFromReceive(buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return icetRetrieveStateImage(ICET_RENDER_BUFFER);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt dim[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTImage image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTVoid *buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTSizeType dummy_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetIntegerv(ICET_PHYSICAL_RENDER_WIDTH, &dim[0]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetIntegerv(ICET_PHYSICAL_RENDER_HEIGHT, &dim[1]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Create a new image object. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- image = icetGetStateBufferImage(ICET_RENDER_BUFFER, dim[0], dim[1]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Record image size and pointer to memory. It is important to "touch"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ICET_RENDER_BUFFER_HOLD to signify the time we created the image so
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- that the above check works on the next call. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetStateSetIntegerv(ICET_RENDER_BUFFER_SIZE, 2, dim);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetImagePackageForSend(image, &buffer, &dummy_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetStateSetPointer(ICET_RENDER_BUFFER_HOLD, buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return icetGetStateBufferImage(ICET_RENDER_BUFFER, dim[0], dim[1]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/ice-t/projections.c src/ice-t/projections.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 8fe46d4..14fafc5 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/ice-t/projections.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/ice-t/projections.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -18,6 +18,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <string.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef MIN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define MIN(x, y) ((x) < (y) ? (x) : (y))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef MAX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define MAX(x, y) ((x) < (y) ? (y) : (x))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static void update_tile_projections(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -173,3 +180,36 @@ static void update_tile_projections(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tile_projections + 16*tile_idx);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void icetIntersectViewports(const IceTInt *src_viewport1,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt *src_viewport2,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *dest_viewport)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt min_x1 = src_viewport1[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt max_x1 = min_x1 + src_viewport1[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt min_y1 = src_viewport1[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt max_y1 = min_y1 + src_viewport1[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt min_x2 = src_viewport2[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt max_x2 = min_x2 + src_viewport2[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt min_y2 = src_viewport2[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt max_y2 = min_y2 + src_viewport2[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt min_x = MAX(min_x1, min_x2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt min_y = MAX(min_y1, min_y2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt max_x = MIN(max_x1, max_x2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt max_y = MIN(max_y1, max_y2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt width = max_x - min_x;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt height = max_y - min_y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((width > 0) && (height > 0)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ dest_viewport[0] = min_x;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ dest_viewport[1] = min_y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ dest_viewport[2] = width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ dest_viewport[3] = height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ dest_viewport[0] = dest_viewport[1] = -1000000;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ dest_viewport[2] = dest_viewport[3] = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/ice-t/state.c src/ice-t/state.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d6b111b..29aa88d 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/ice-t/state.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/ice-t/state.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -28,6 +28,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ struct IceTStateValue {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTEnum type;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType num_entries;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType buffer_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void *data;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTTimeStamp mod_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -194,9 +195,9 @@ void icetStateSetDefaults(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetEnable(ICET_COMPOSITE_ONE_BUFFER);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetEnable(ICET_INTERLACE_IMAGES);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetEnable(ICET_COLLECT_IMAGES);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetDisable(ICET_RENDER_EMPTY_IMAGES);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetStateSetBoolean(ICET_IS_DRAWING_FRAME, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetStateSetBoolean(ICET_RENDER_BUFFER_SIZE, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetStateSetInteger(ICET_VALID_PIXELS_TILE, -1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetStateSetInteger(ICET_VALID_PIXELS_OFFSET, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -450,7 +451,7 @@ static const IceTByte g_post_padding[STATE_PADDING_SIZE] = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static void stateCheck(IceTEnum pname, const IceTState state)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (state[pname].type != ICET_NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (state[pname].num_entries > 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (state[pname].buffer_size > 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType i;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTByte *padding;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ padding = STATE_DATA_PRE_PADDING(pname, state);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -479,7 +480,7 @@ static void stateCheck(IceTEnum pname, const IceTState state)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (state[pname].data != NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ char message[256];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sprintf(message,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "State variable 0x%X has zero entries but"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "State variable 0x%X has zero sized buffer but"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ " non-null pointer.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pname);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetRaiseError(message, ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -503,6 +504,15 @@ static void stateCheck(IceTEnum pname, const IceTState state)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (int)state[pname].num_entries);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetRaiseError(message, ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (state[pname].buffer_size != 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ char message[256];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sprintf(message,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "State variable 0x%X has ICET_NULL type but"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ " also has a buffer of size %d (!= 0).",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pname,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (int)state[pname].buffer_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError(message, ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else /* ICET_STATE_CHECK_MEM */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -517,32 +527,43 @@ static IceTVoid *stateAllocate(IceTEnum pname,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTEnum type,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTState state)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTVoid *buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ stateCheck(pname, state);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (num_entries < 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Asked to allocate buffer of negative size",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ( (num_entries == state[pname].num_entries)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && (type == state[pname].type) ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Return the current buffer. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Current buffer already configured correctly. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state[pname].mod_time = icetGetTimeStamp();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- buffer = state[pname].data;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- } else if (num_entries > 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- stateFree(pname, state);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Create a new buffer. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- buffer = malloc(STATE_DATA_ALLOCATE(type, num_entries));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (buffer == NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetRaiseError("Could not allocate memory for state variable.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ICET_OUT_OF_MEMORY);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if ((num_entries > 0) || (state[pname].buffer_size > 0)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType buffer_size = STATE_DATA_ALLOCATE(type, num_entries);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (buffer_size < state[pname].buffer_size) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Reuse larger buffer. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ stateCheck(pname, state);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Create a new buffer. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTVoid *buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ stateFree(pname, state);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ buffer = malloc(STATE_DATA_ALLOCATE(type, num_entries));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (buffer == NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Could not allocate memory for state variable.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_OUT_OF_MEMORY);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef ICET_STATE_CHECK_MEM
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Skip past padding. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- buffer = (IceTByte *)buffer + STATE_PADDING_SIZE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Skip past padding. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ buffer = (IceTByte *)buffer + STATE_PADDING_SIZE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ state[pname].buffer_size = buffer_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ state[pname].data = buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state[pname].type = type;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state[pname].num_entries = num_entries;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- state[pname].data = buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state[pname].mod_time = icetGetTimeStamp();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef ICET_STATE_CHECK_MEM
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -561,25 +582,24 @@ static IceTVoid *stateAllocate(IceTEnum pname,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else { /* num_entries <= 0 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- buffer = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state[pname].type = type;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state[pname].num_entries = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- state[pname].data = buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ state[pname].buffer_size = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ state[pname].data = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state[pname].mod_time = icetGetTimeStamp();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef ICET_STATE_CHECK_MEM
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- memset(buffer, 0xDC, STATE_DATA_WIDTH(type, num_entries));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ memset(state[pname].data, 0xDC, STATE_DATA_WIDTH(type, num_entries));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return state[pname].data;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static void stateFree(IceTEnum pname, IceTState state)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ stateCheck(pname, state);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if ((state[pname].type != ICET_NULL) && (state[pname].num_entries > 0)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((state[pname].type != ICET_NULL) && (state[pname].buffer_size > 0)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef ICET_STATE_CHECK_MEM
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ free(STATE_DATA_PRE_PADDING(pname, state));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -587,6 +607,7 @@ static void stateFree(IceTEnum pname, IceTState state)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state[pname].type = ICET_NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state[pname].num_entries = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ state[pname].buffer_size = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state[pname].data = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ state[pname].mod_time = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -612,9 +633,9 @@ static void *icetUnsafeStateGet(IceTEnum pname, IceTEnum type)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ stateCheck(pname, icetGetState());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (icetGetState()[pname].type != type) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetRaiseError("Mismatched types in unsafe state get.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Mismatched types in unsafe state get.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return icetGetState()[pname].data;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -639,6 +660,10 @@ const IceTVoid **icetUnsafeStateGetPointer(IceTEnum pname)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return icetUnsafeStateGet(pname, ICET_POINTER);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++const IceTVoid *icetUnsafeStateGetBuffer(IceTEnum pname)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return icetUnsafeStateGet(pname, ICET_VOID);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble *icetStateAllocateDouble(IceTEnum pname, IceTSizeType num_entries)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -663,16 +688,6 @@ IceTVoid **icetStateAllocatePointer(IceTEnum pname, IceTSizeType num_entries)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTVoid *icetGetStateBuffer(IceTEnum pname, IceTSizeType num_bytes)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if ( (icetStateGetType(pname) == ICET_VOID)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- && (icetStateGetNumEntries(pname) >= num_bytes) ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* A big enough buffer is already allocated. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTVoid *buffer = icetUnsafeStateGet(pname, ICET_VOID);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef ICET_STATE_CHECK_MEM
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- memset(buffer, 0xDC, num_bytes);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Check to make sure this state variable has not been used for anything
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * besides a buffer. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ( (icetStateGetType(pname) != ICET_VOID)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/ice-t/tiles.c src/ice-t/tiles.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 916f65c..d0b3c0a 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/ice-t/tiles.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/ice-t/tiles.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -40,7 +40,7 @@ void icetResetTiles(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define MAX(x, y) ((x) >= (y) ? (x) : (y))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int icetAddTile(IceTInt x, IceTInt y, IceTSizeType width, IceTSizeType height,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int display_rank)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int display_rank)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt num_tiles;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt *viewports;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -69,26 +69,26 @@ int icetAddTile(IceTInt x, IceTInt y, IceTSizeType width, IceTSizeType height,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Check and update display ranks. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (display_rank >= num_processors) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sprintf(msg, "icetDisplayNodes: Invalid rank for tile %d.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- (int)num_tiles);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetRaiseError(msg, ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- free(display_nodes);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sprintf(msg, "icetDisplayNodes: Invalid rank for tile %d.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (int)num_tiles);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError(msg, ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ free(display_nodes);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (i = 0; i < num_tiles; i++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (display_nodes[i] == display_rank) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sprintf(msg, "icetDisplayNodes: Rank %d used for tiles %d and %d.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- display_rank, i, (int)num_tiles);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetRaiseError(msg, ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- free(display_nodes);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (display_nodes[i] == display_rank) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sprintf(msg, "icetDisplayNodes: Rank %d used for tiles %d and %d.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ display_rank, i, (int)num_tiles);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError(msg, ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ free(display_nodes);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ display_nodes[num_tiles] = display_rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetStateSetIntegerv(ICET_DISPLAY_NODES, num_tiles+1, display_nodes);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ free(display_nodes);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (display_rank == rank) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetStateSetInteger(ICET_TILE_DISPLAYED, num_tiles);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStateSetInteger(ICET_TILE_DISPLAYED, num_tiles);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Get viewports. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -99,10 +99,10 @@ int icetAddTile(IceTInt x, IceTInt y, IceTSizeType width, IceTSizeType height,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gvp[0] = x; gvp[1] = y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gvp[2] = x + (IceTInt)width; gvp[3] = y + (IceTInt)height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (i = 0; i < num_tiles; i++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gvp[0] = MIN(gvp[0], viewports[i*4+0]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gvp[1] = MIN(gvp[1], viewports[i*4+1]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gvp[2] = MAX(gvp[2], viewports[i*4+0] + viewports[i*4+2]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gvp[3] = MAX(gvp[3], viewports[i*4+1] + viewports[i*4+3]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ gvp[0] = MIN(gvp[0], viewports[i*4+0]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ gvp[1] = MIN(gvp[1], viewports[i*4+1]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ gvp[2] = MAX(gvp[2], viewports[i*4+0] + viewports[i*4+2]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ gvp[3] = MAX(gvp[3], viewports[i*4+1] + viewports[i*4+3]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gvp[2] -= gvp[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gvp[3] -= gvp[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -142,8 +142,8 @@ void icetPhysicalRenderSize(IceTInt width, IceTInt height)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetIntegerv(ICET_TILE_MAX_WIDTH, &max_width);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetIntegerv(ICET_TILE_MAX_HEIGHT, &max_height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ((width < max_width) || (height < max_height)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetRaiseWarning("Physical render dimensions not large enough"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- " to render all tiles.", ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseWarning("Physical render dimensions not large enough"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ " to render all tiles.", ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetStateSetInteger(ICET_PHYSICAL_RENDER_WIDTH, width);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -151,8 +151,8 @@ void icetPhysicalRenderSize(IceTInt width, IceTInt height)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void icetBoundingBoxd(IceTDouble x_min, IceTDouble x_max,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTDouble y_min, IceTDouble y_max,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTDouble z_min, IceTDouble z_max)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble y_min, IceTDouble y_max,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble z_min, IceTDouble z_max)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble vertices[8*3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -170,26 +170,33 @@ void icetBoundingBoxd(IceTDouble x_min, IceTDouble x_max,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void icetBoundingBoxf(IceTFloat x_min, IceTFloat x_max,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTFloat y_min, IceTFloat y_max,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTFloat z_min, IceTFloat z_max)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTFloat y_min, IceTFloat y_max,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTFloat z_min, IceTFloat z_max)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetBoundingBoxd(x_min, x_max, y_min, y_max, z_min, z_max);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void icetBoundingVertices(IceTInt size, IceTEnum type, IceTSizeType stride,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTSizeType count, const IceTVoid *pointer)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType count, const IceTVoid *pointer)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble *verts;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int i, j;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (count < 1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* No vertices. (Must be clearing them out.) */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStateSetDoublev(ICET_GEOMETRY_BOUNDS, 0, NULL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStateSetInteger(ICET_NUM_BOUNDING_VERTS, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (stride < 1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ stride = size*icetTypeWidth(type);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ verts = malloc(count*3*sizeof(IceTDouble));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (i = 0; i < count; i++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for (j = 0; j < 3; j++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- switch (type) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (j = 0; j < 3; j++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ switch (type) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define castcopy(ptype) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (j < size) { \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ verts[i*3+j] = ((ptype *)pointer)[i*stride/sizeof(type)+j]; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -200,21 +207,21 @@ void icetBoundingVertices(IceTInt size, IceTEnum type, IceTSizeType stride,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ verts[i*3+j] /= ((ptype *)pointer)[i*stride/sizeof(type)+4]; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case ICET_SHORT:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- castcopy(IceTShort);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case ICET_INT:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- castcopy(IceTInt);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case ICET_FLOAT:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- castcopy(IceTFloat);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case ICET_DOUBLE:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- castcopy(IceTDouble);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetRaiseError("Bad type to icetBoundingVertices.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ICET_INVALID_ENUM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- free(verts);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_SHORT:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ castcopy(IceTShort);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_INT:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ castcopy(IceTInt);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_FLOAT:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ castcopy(IceTFloat);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_DOUBLE:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ castcopy(IceTDouble);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Bad type to icetBoundingVertices.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_INVALID_ENUM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ free(verts);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetStateSetDoublev(ICET_GEOMETRY_BOUNDS, count*3, verts);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/ice-t/timing.c src/ice-t/timing.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 445b56c..25af7ca 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/ice-t/timing.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/ice-t/timing.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -34,6 +34,7 @@ void icetStateResetTiming(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetStateSetDouble(ICET_BUFFER_READ_TIME, 0.0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetStateSetDouble(ICET_BUFFER_WRITE_TIME, 0.0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetStateSetDouble(ICET_COMPRESS_TIME, 0.0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStateSetDouble(ICET_INTERLACE_TIME, 0.0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetStateSetDouble(ICET_BLEND_TIME, 0.0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetStateSetDouble(ICET_COMPOSITE_TIME, 0.0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetStateSetDouble(ICET_COLLECT_TIME, 0.0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -103,7 +104,8 @@ static void icetTimingEnd(IceTEnum start_pname,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble old_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetDoublev(start_pname, &start_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetDoublev(result_pname, &old_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetStateSetDouble(result_pname, icetWallTime() - start_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStateSetDouble(result_pname,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ old_time + (icetWallTime() - start_time));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -167,6 +169,21 @@ void icetTimingCompressEnd(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "compress");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void icetTimingInterlaceBegin(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetTimingBegin(ICET_SUBFUNC_START_TIME,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SUBFUNC_TIME_ID,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_INTERLACE_TIME,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "interlace");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void icetTimingInterlaceEnd(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetTimingEnd(ICET_SUBFUNC_START_TIME,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SUBFUNC_TIME_ID,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_INTERLACE_TIME,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "interlace");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void icetTimingBlendBegin(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetTimingBegin(ICET_SUBFUNC_START_TIME,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/include/IceT.h src/include/IceT.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 3e4e70e..fb50663 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/include/IceT.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/include/IceT.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -50,6 +50,10 @@ struct IceTCommunicatorStruct {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ struct IceTCommunicatorStruct *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (*Duplicate)(struct IceTCommunicatorStruct *self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void (*Destroy)(struct IceTCommunicatorStruct *self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ struct IceTCommunicatorStruct *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (*Subset)(struct IceTCommunicatorStruct *self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt32 *ranks);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void (*Barrier)(struct IceTCommunicatorStruct *self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void (*Send)(struct IceTCommunicatorStruct *self,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -123,6 +127,7 @@ struct IceTCommunicatorStruct {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ typedef struct IceTCommunicatorStruct *IceTCommunicator;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ICET_COMM_NULL ((IceTCommunicator)NULL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT IceTDouble icetWallTime(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -214,6 +219,8 @@ ICET_EXPORT const char *icetGetStrategyName(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_SINGLE_IMAGE_STRATEGY_BSWAP (IceTEnum)0x7002
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_SINGLE_IMAGE_STRATEGY_TREE (IceTEnum)0x7003
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_SINGLE_IMAGE_STRATEGY_RADIXK (IceTEnum)0x7004
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ICET_SINGLE_IMAGE_STRATEGY_RADIXKR (IceTEnum)0x7005
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ICET_SINGLE_IMAGE_STRATEGY_BSWAP_FOLDING (IceTEnum)0x7006
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT void icetSingleImageStrategy(IceTEnum strategy);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -241,6 +248,13 @@ ICET_EXPORT IceTImage icetDrawFrame(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const IceTDouble *modelview_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const IceTFloat *background_color);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ICET_EXPORT IceTImage icetCompositeImage(const IceTVoid *color_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTVoid *depth_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt *valid_pixels_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTDouble *modelview_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTFloat *background_color);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_DIAG_OFF (IceTEnum)0x0000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_DIAG_ERRORS (IceTEnum)0x0001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_DIAG_WARNINGS (IceTEnum)0x0003
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -315,9 +329,8 @@ ICET_EXPORT void icetDiagnostics(IceTBitField mask);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_RENDERED_VIEWPORT (ICET_STATE_FRAME_START | (IceTEnum)0x0020)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_RENDER_BUFFER (ICET_STATE_FRAME_START | (IceTEnum)0x0021)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define ICET_RENDER_BUFFER_SIZE (ICET_STATE_FRAME_START | (IceTEnum)0x0022)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define ICET_RENDER_BUFFER_HOLD (ICET_STATE_FRAME_START | (IceTEnum)0x0023)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define ICET_TILE_PROJECTIONS (ICET_STATE_FRAME_START | (IceTEnum)0x0024)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ICET_PRE_RENDERED (ICET_STATE_FRAME_START | (IceTEnum)0x0022)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ICET_TILE_PROJECTIONS (ICET_STATE_FRAME_START | (IceTEnum)0x0023)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_STATE_TIMING_START (IceTEnum)0x000000C0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -325,12 +338,13 @@ ICET_EXPORT void icetDiagnostics(IceTBitField mask);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_BUFFER_READ_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0002)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_BUFFER_WRITE_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0003)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_COMPRESS_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0004)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define ICET_COMPARE_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0005)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ICET_INTERLACE_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0005)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ICET_COMPARE_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0006)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_BLEND_TIME ICET_COMPARE_TIME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define ICET_COMPOSITE_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0006)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define ICET_COLLECT_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0007)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define ICET_TOTAL_DRAW_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0008)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define ICET_BYTES_SENT (ICET_STATE_TIMING_START | (IceTEnum)0x0009)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ICET_COMPOSITE_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0007)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ICET_COLLECT_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0008)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ICET_TOTAL_DRAW_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0009)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ICET_BYTES_SENT (ICET_STATE_TIMING_START | (IceTEnum)0x000A)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_DRAW_START_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0010)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_DRAW_TIME_ID (ICET_STATE_TIMING_START | (IceTEnum)0x0011)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -350,6 +364,7 @@ ICET_EXPORT void icetDiagnostics(IceTBitField mask);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_COMPOSITE_ONE_BUFFER (ICET_STATE_ENABLE_START | (IceTEnum)0x0004)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_INTERLACE_IMAGES (ICET_STATE_ENABLE_START | (IceTEnum)0x0005)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_COLLECT_IMAGES (ICET_STATE_ENABLE_START | (IceTEnum)0x0006)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ICET_RENDER_EMPTY_IMAGES (ICET_STATE_ENABLE_START | (IceTEnum)0x0007)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* This set of enable state variables are reserved for the rendering layer. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_RENDER_LAYER_ENABLE_START (ICET_STATE_ENABLE_START | (IceTEnum)0x0030)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/include/IceTDevCommunication.h src/include/IceTDevCommunication.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 1cbbc12..97cecc3 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/include/IceTDevCommunication.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/include/IceTDevCommunication.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -22,6 +22,8 @@ extern "C" {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* All of these methods call the associated method in the communicator for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the current context. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT IceTCommunicator icetCommDuplicate();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ICET_EXPORT IceTCommunicator icetCommSubset(int count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt32 *ranks);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT void icetCommBarrier();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT void icetCommSend(const void *buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/include/IceTDevImage.h src/include/IceTDevImage.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 8448c7f..03d88a4 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/include/IceTDevImage.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/include/IceTDevImage.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -23,9 +23,10 @@ extern "C" {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_SRC_ON_TOP ICET_TRUE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ICET_DEST_ON_TOP ICET_FALSE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-ICET_EXPORT IceTImage icetGetStateBufferImage(IceTEnum pname,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTSizeType width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTSizeType height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ICET_EXPORT IceTImage icetGetStateBufferImage(IceTEnum pname,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ICET_EXPORT IceTImage icetRetrieveStateImage(IceTEnum pname);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT IceTSizeType icetImageBufferSize(IceTSizeType width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT IceTSizeType icetImageBufferSizeType(IceTEnum color_format,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -35,6 +36,17 @@ ICET_EXPORT IceTSizeType icetImageBufferSizeType(IceTEnum color_format,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT IceTImage icetImageAssignBuffer(IceTVoid *buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ICET_EXPORT IceTImage icetGetStatePointerImage(IceTEnum pname,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType height,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTVoid *color_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTVoid *depth_buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ICET_EXPORT IceTSizeType icetImagePointerBufferSize(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ICET_EXPORT IceTImage icetImagePointerAssignBuffer(IceTVoid *buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType height,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTVoid *color_buf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTVoid *depth_buf);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT void icetImageAdjustForOutput(IceTImage image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT void icetImageAdjustForInput(IceTImage image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT void icetImageSetDimensions(IceTImage image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/include/IceTDevProjections.h src/include/IceTDevProjections.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 2b0edf7..2bf7df3 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/include/IceTDevProjections.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/include/IceTDevProjections.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -19,11 +19,25 @@ extern "C" {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Given the index to a tile, returns an adjusted ICET_PROJECTION_MATRIX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for the tile. If the physical render size is larger than the tile,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ then the tile projection occurs in the lower left corner. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT void icetProjectTile(IceTInt tile, IceTDouble *mat_out);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Given a viewport (defined by x, y, width, and height), return a matrix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ transforms a projection from the global display to the display provided. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT void icetGetViewportProject(IceTInt x, IceTInt y,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTSizeType width, IceTSizeType height,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTDouble *mat_out);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType width, IceTSizeType height,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble *mat_out);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Given two viewports, returns the region that is their intersection. It
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ is OK if either of the two src_viewport pointer point to the same memory
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ as dest_viewport. If the intersection is empty, the width and height
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ of dest_viewport will be 0 and the x and y will be set to -1000000 (to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ place them outside of reasonable viewports). */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ICET_EXPORT void icetIntersectViewports(const IceTInt *src_viewport1,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt *src_viewport2,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *dest_viewport);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef __cplusplus
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/include/IceTDevState.h src/include/IceTDevState.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 02c4e93..159c99a 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/include/IceTDevState.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/include/IceTDevState.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -62,6 +62,7 @@ ICET_EXPORT const IceTFloat *icetUnsafeStateGetFloat(IceTEnum pname);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT const IceTInt *icetUnsafeStateGetInteger(IceTEnum pname);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT const IceTBoolean *icetUnsafeStateGetBoolean(IceTEnum pname);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT const IceTVoid **icetUnsafeStateGetPointer(IceTEnum pname);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ICET_EXPORT const IceTVoid *icetUnsafeStateGetBuffer(IceTEnum pname);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT IceTDouble *icetStateAllocateDouble(IceTEnum pname,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType num_entries);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/include/IceTDevTiming.h src/include/IceTDevTiming.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index ad5edd5..d1903c0 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/include/IceTDevTiming.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/include/IceTDevTiming.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -32,6 +32,9 @@ ICET_EXPORT void icetTimingBufferWriteEnd(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT void icetTimingCompressBegin(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT void icetTimingCompressEnd(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ICET_EXPORT void icetTimingInterlaceBegin(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ICET_EXPORT void icetTimingInterlaceEnd(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT void icetTimingBlendBegin(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ICET_EXPORT void icetTimingBlendEnd(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/strategies/automatic.c src/strategies/automatic.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index aee27f8..74d5bc0 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/strategies/automatic.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/strategies/automatic.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -21,8 +21,8 @@ void icetAutomaticCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType *piece_offset)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (group_size > 1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetRaiseDebug("Doing radix-k compose");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetInvokeSingleImageStrategy(ICET_SINGLE_IMAGE_STRATEGY_RADIXK,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseDebug("Doing radix-kr compose");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetInvokeSingleImageStrategy(ICET_SINGLE_IMAGE_STRATEGY_RADIXKR,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ image_dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -34,7 +34,7 @@ void icetAutomaticCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *result_image = input_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *piece_offset = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetRaiseDebug("Clearing pixels");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseDebug("Clearing pixels");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetClearSparseImage(input_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *result_image = input_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *piece_offset = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/strategies/bswap.c src/strategies/bswap.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index b8960c8..8a8fb16 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/strategies/bswap.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/strategies/bswap.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -13,14 +13,18 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevDiagnostics.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevImage.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <string.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define BSWAP_INCOMING_IMAGES_BUFFER ICET_SI_STRATEGY_BUFFER_0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define BSWAP_OUTGOING_IMAGES_BUFFER ICET_SI_STRATEGY_BUFFER_1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define BSWAP_SPARE_WORKING_IMAGE_BUFFER ICET_SI_STRATEGY_BUFFER_2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define BSWAP_IMAGE_ARRAY ICET_SI_STRATEGY_BUFFER_3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define BSWAP_DUMMY_ARRAY ICET_SI_STRATEGY_BUFFER_4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define BSWAP_COMPOSE_GROUP_BUFFER ICET_SI_STRATEGY_BUFFER_5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define BSWAP_SWAP_IMAGES 21
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define BSWAP_TELESCOPE 22
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define BSWAP_FOLD 23
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define BIT_REVERSE(result, x, max_val_plus_one) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ { \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -554,7 +558,7 @@ static void bswapComposeNoCombine(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ input_image = working_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ available_image = icetSparseImageNull();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* I am part of the lower group. Do the actual binary swap. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bswapComposePow2(compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -594,7 +598,7 @@ void icetBswapCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSparseImage *result_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType *piece_offset)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetRaiseDebug("In bswapCompose");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseDebug("In binary-swap compose");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Remove warning about unused parameter. Binary swap leaves images evenly
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * partitioned, so we have no use of the image_dest parameter. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -608,3 +612,141 @@ void icetBswapCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ result_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ piece_offset);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void icetBswapFoldingCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt image_dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage input_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage *result_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType *piece_offset)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt group_rank = icetFindMyRankInGroup(compose_group, group_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt pow2size = bswapFindPower2(group_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt extra_proc = group_size - pow2size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean use_interlace;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage working_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage available_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage spare_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType total_num_pixels = icetSparseImageGetNumPixels(input_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *pow2group;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseDebug("In binary-swap folding compose");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (void)image_dest; /* not used */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (group_size < 2) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *result_image = input_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *piece_offset = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Interlace images when requested. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ use_interlace = (pow2size > 2) && icetIsEnabled(ICET_INTERLACE_IMAGES);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (use_interlace) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage interlaced_image = icetGetStateBufferSparseImage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ BSWAP_SPARE_WORKING_IMAGE_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSparseImageGetWidth(input_image),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSparseImageGetHeight(input_image));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSparseImageInterlace(input_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pow2size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ BSWAP_DUMMY_ARRAY,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ interlaced_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ working_image = interlaced_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ available_image = input_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Allocate available (scratch) image buffer. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ available_image = icetGetStateBufferSparseImage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ BSWAP_SPARE_WORKING_IMAGE_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSparseImageGetWidth(input_image),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSparseImageGetHeight(input_image));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ working_image = input_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Fold the existing number of processes into a subset that is the maximum
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * power of 2. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pow2group = icetGetStateBuffer(BSWAP_COMPOSE_GROUP_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sizeof(IceTInt)*pow2size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt whole_group_index = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt pow2group_index = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ while (pow2group_index < extra_proc) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pow2group[pow2group_index] = compose_group[whole_group_index];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (group_rank == whole_group_index) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* I need to receive a folded image and composite it. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType incoming_size
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ = icetSparseImageBufferSize(total_num_pixels, 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTVoid *in_image_buffer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ = icetGetStateBuffer(BSWAP_INCOMING_IMAGES_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ incoming_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage in_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage old_working_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCommRecv(in_image_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ incoming_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_BYTE,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ compose_group[whole_group_index+1],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ BSWAP_FOLD);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ in_image = icetSparseImageUnpackageFromReceive(in_image_buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCompressedCompressedComposite(working_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ in_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ available_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ old_working_image = working_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ working_image = available_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ available_image = old_working_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if (group_rank == whole_group_index + 1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* I need to send my image to get folded then drop out. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTVoid *package_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType package_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSparseImagePackageForSend(working_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ &package_buffer, &package_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCommSend(package_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ package_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_BYTE,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ compose_group[whole_group_index],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ BSWAP_FOLD);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *result_image = icetSparseImageNull();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *piece_offset = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ whole_group_index += 2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pow2group_index++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* That handles all the folded images. The rest of the group can just
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * copy over. Do a sanity check too to make sure that we haven't messed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * up our indexing. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((group_size - whole_group_index) != (pow2size - pow2group_index)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Miscounted indices while folding.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ memcpy(&pow2group[pow2group_index],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ &compose_group[whole_group_index],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sizeof(IceTInt)*(group_size-whole_group_index));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Time to do the actual binary-swap on our new power of two group. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ bswapComposePow2(pow2group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pow2size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pow2size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ working_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ available_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ piece_offset,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ &spare_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (use_interlace) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt global_partition;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt pow2rank = icetFindMyRankInGroup(pow2group, pow2size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ BIT_REVERSE(global_partition, pow2rank, pow2size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *piece_offset = icetGetInterlaceOffset(global_partition,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pow2size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ total_num_pixels);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/strategies/radixk.c src/strategies/radixk.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d467e8f..b844a12 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/strategies/radixk.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/strategies/radixk.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -30,6 +30,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevDiagnostics.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevImage.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* #define RADIXK_USE_TELESCOPE */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define RADIXK_SWAP_IMAGE_TAG_START 2200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define RADIXK_TELESCOPE_IMAGE_TAG 2300
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -91,6 +93,7 @@ typedef struct radixkPartnerInfoStruct {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef RADIXK_USE_TELESCOPE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Finds the largest power of 2 equal to or smaller than x. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTInt radixkFindPower2(IceTInt x)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -99,6 +102,7 @@ static IceTInt radixkFindPower2(IceTInt x)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pow2 = pow2 >> 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return pow2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTInt radixkFindFloorPow2(IceTInt x)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -784,14 +788,13 @@ static void radixkCompositeIncomingImages(radixkPartnerInfo *partners,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void icetRadixkBasicCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void icetRadixkBasicCompose(const radixkInfo *info,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt total_num_partitions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSparseImage working_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType *piece_offset)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- radixkInfo info = { NULL, 0 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType my_offset;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt current_round;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt remaining_partitions;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -812,10 +815,8 @@ static void icetRadixkBasicCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- info = radixkGetK(group_size, group_rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* num_rounds > 0 is assumed several places throughout this function */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (info.num_rounds <= 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (info->num_rounds <= 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetRaiseError("Radix-k has no rounds?", ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -826,9 +827,9 @@ static void icetRadixkBasicCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ my_offset = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ remaining_partitions = total_num_partitions;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for (current_round = 0; current_round < info.num_rounds; current_round++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (current_round = 0; current_round < info->num_rounds; current_round++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType my_size = icetSparseImageGetNumPixels(working_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const radixkRoundInfo *round_info = &info.rounds[current_round];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const radixkRoundInfo *round_info = &info->rounds[current_round];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ radixkPartnerInfo *partners = radixkGetPartners(round_info,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ remaining_partitions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -875,6 +876,8 @@ static void icetRadixkBasicCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef RADIXK_USE_TELESCOPE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTInt icetRadixkTelescopeFindUpperGroupSender(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const IceTInt *my_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt my_group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -971,9 +974,15 @@ static void icetRadixkTelescopeComposeReceive(const IceTInt *my_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSparseImage working_image = input_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt upper_sender;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkInfo info;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt my_group_rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ my_group_rank = icetFindMyRankInGroup(my_group, my_group_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info = radixkGetK(my_group_size, my_group_rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Start with the basic compose of my group. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetRadixkBasicCompose(my_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRadixkBasicCompose(&info,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ my_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ my_group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ total_num_partitions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ working_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1206,7 +1215,7 @@ static void icetRadixkTelescopeCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Here is a convenient place to determine the final number of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ partitions. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Middle argument does not matter. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Group rank does not matter for our purposes. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ radixkInfo info = radixkGetK(main_group_size, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ total_num_partitions = radixkGetTotalNumPartitions(&info);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1254,7 +1263,7 @@ static void icetRadixkTelescopeCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ result_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ piece_offset);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* In the sub group. */\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* In the sub group. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetRadixkTelescopeComposeSend(main_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ main_group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sub_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1280,12 +1289,11 @@ static void icetRadixkTelescopeCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- info = radixkGetK(main_group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- main_group_rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info = radixkGetK(main_group_size, main_group_rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global_partition = radixkGetFinalPartitionIndex(&info);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *piece_offset = icetGetInterlaceOffset(global_partition,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- main_group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ total_num_partitions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ original_image_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1293,6 +1301,7 @@ static void icetRadixkTelescopeCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void icetRadixkCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt image_dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1308,6 +1317,59 @@ void icetRadixkCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ piece_offset);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void icetRadixkCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt image_dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage input_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage *result_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType *piece_offset)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt group_rank = icetFindMyRankInGroup(compose_group, group_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkInfo info = radixkGetK(group_size, group_rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt total_num_partitions = radixkGetTotalNumPartitions(&info);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean use_interlace = icetIsEnabled(ICET_INTERLACE_IMAGES);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage working_image = input_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType original_image_size = icetSparseImageGetNumPixels(input_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (void)image_dest; /* Not used. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (use_interlace) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ use_interlace = (info.num_rounds > 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (use_interlace) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage interlaced_image = icetGetStateBufferSparseImage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RADIXK_INTERLACED_IMAGE_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSparseImageGetWidth(working_image),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSparseImageGetHeight(working_image));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSparseImageInterlace(working_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ total_num_partitions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RADIXK_SPLIT_OFFSET_ARRAY_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ interlaced_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ working_image = interlaced_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRadixkBasicCompose(&info,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ total_num_partitions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ working_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ piece_offset);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *result_image = working_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (use_interlace && (0 < icetSparseImageGetNumPixels(working_image))) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt global_partition = radixkGetFinalPartitionIndex(&info);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *piece_offset = icetGetInterlaceOffset(global_partition,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ total_num_partitions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ original_image_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTBoolean radixkTryPartitionLookup(IceTInt group_size)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt *partition_assignments;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1422,6 +1484,8 @@ ICET_EXPORT IceTBoolean icetRadixkPartitionLookupUnitTest(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef RADIXK_USE_TELESCOPE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define MAIN_GROUP_RANK(idx) (10000 + idx)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define SUB_GROUP_RANK(idx) (20000 + idx)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTBoolean radixkTryTelescopeSendReceive(IceTInt *main_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1495,7 +1559,7 @@ static IceTBoolean radixkTryTelescopeSendReceive(IceTInt *main_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-ICET_EXPORT IceTBoolean icetRadixTelescopeSendReceiveTest(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ICET_EXPORT IceTBoolean icetRadixkTelescopeSendReceiveTest(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt main_group_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1556,3 +1620,13 @@ ICET_EXPORT IceTBoolean icetRadixTelescopeSendReceiveTest(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else /*!RADIXK_USE_TELESCOPE*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ICET_EXPORT IceTBoolean icetRadixkTelescopeSendReceiveTest(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Telescope method disabled. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif /*!RADIXK_USE_TELESCOPE*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/strategies/radixkr.c src/strategies/radixkr.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+new file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0000000..e34bc00
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/strategies/radixkr.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,1037 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* -*- c -*- *******************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Copyright (C) 2010 Sandia Corporation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * the U.S. Government retains certain rights in this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* The Radix-k algorithm was designed by Tom Peterka at Argonne National
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Laboratory.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Copyright (c) University of Chicago
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Permission is hereby granted to use, reproduce, prepare derivative works, and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to redistribute to others.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ The Radix-k algorithm was ported to IceT by Wesley Kendall from University
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ of Tennessee at Knoxville.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ The derived Radix-kr algorithm was designed by Kenneth Moreland at Sandia
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ National Laboratories.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdio.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <math.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <mpi.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <string.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceT.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceTDevCommunication.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceTDevDiagnostics.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceTDevImage.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RADIXKR_SWAP_IMAGE_TAG_START 2200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RADIXKR_RECEIVE_BUFFER ICET_SI_STRATEGY_BUFFER_0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RADIXKR_SEND_BUFFER ICET_SI_STRATEGY_BUFFER_1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RADIXKR_SPARE_BUFFER ICET_SI_STRATEGY_BUFFER_2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RADIXKR_INTERLACED_IMAGE_BUFFER ICET_SI_STRATEGY_BUFFER_3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RADIXKR_PARTITION_INFO_BUFFER ICET_SI_STRATEGY_BUFFER_4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RADIXKR_RECEIVE_REQUEST_BUFFER ICET_SI_STRATEGY_BUFFER_5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RADIXKR_SEND_REQUEST_BUFFER ICET_SI_STRATEGY_BUFFER_6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RADIXKR_FACTORS_ARRAY_BUFFER ICET_SI_STRATEGY_BUFFER_7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RADIXKR_SPLIT_OFFSET_ARRAY_BUFFER ICET_SI_STRATEGY_BUFFER_8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RADIXKR_SPLIT_IMAGE_ARRAY_BUFFER ICET_SI_STRATEGY_BUFFER_9
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++typedef struct radixkrRoundInfoStruct {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt k; /* k value for this round. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt r; /* remainder for this round (number of processes dropped). */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt step; /* Ranks jump by this much in this round. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt split_factor; /* Number of new image partitions made from each partition. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean has_image; /* True if local process collects image data this round. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean last_partition; /* True if local process is part of the last partition. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt first_rank; /* The lowest rank of those participating with this process this round. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt partition_index; /* Index of partition at this round (if has_image true). */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++} radixkrRoundInfo;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++typedef struct radixkrInfoStruct {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrRoundInfo *rounds; /* Array of per round info. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt num_rounds;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++} radixkrInfo;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++typedef struct radixkrPartnerInfoStruct {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank; /* Rank of partner. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType offset; /* Offset of partner's partition in image. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTVoid *receiveBuffer; /* A buffer for receiving data from partner. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage sendImage; /* A buffer to hold data being sent to partner */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage receiveImage; /* Hold for received non-composited image. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt compositeLevel; /* Level in compositing tree for round. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++} radixkrPartnerInfo;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++typedef struct radixkrPartnerGroupInfoStruct {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrPartnerInfo *partners; /* Array of partners in this group. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt num_partners; /* Number of partners in this group. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++} radixkrPartnerGroupInfo;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* BEGIN_PIVOT_FOR(loop_var, low, pivot, high)...END_PIVOT_FOR() provides a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ special looping mechanism that iterates over the numbers pivot, pivot-1,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pivot+1, pivot-2, pivot-3,... until all numbers between low (inclusive) and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ high (exclusive) are visited. Any numbers outside [low,high) are skipped. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define BEGIN_PIVOT_FOR(loop_var, low, pivot, high) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ { \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt loop_var##_true_iter; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt loop_var##_max = 2*( ((pivot) < ((high)+(low))/2) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ? ((high)-(pivot)) : ((pivot)-(low)+1) ); \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (loop_var##_true_iter = 1; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ loop_var##_true_iter < loop_var##_max; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ loop_var##_true_iter ++) { \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((loop_var##_true_iter % 2) == 0) { \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ loop_var = (pivot) - loop_var##_true_iter/2; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (loop_var < (low)) continue; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else { \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ loop_var = (pivot) + loop_var##_true_iter/2; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((high) <= loop_var) continue; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define END_PIVOT_FOR() \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTInt radixkrFindFloorLog2(IceTInt x)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt lg;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (lg = 0; (IceTUInt)(1 << lg) <= (IceTUInt)x; lg++);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lg--;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return lg;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void radixkrSwapImages(IceTSparseImage *image1, IceTSparseImage *image2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage old_image1 = *image1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *image1 = *image2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *image2 = old_image1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* radixkrGetPartitionIndices
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ my position in each round forms an num_rounds-dimensional vector
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ [round 0 pos, round 1 pos, ... round num_rounds-1 pos]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ where pos is my position in the group of partners within that round
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ inputs:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info: holds the number of rounds and k values for each round
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ group_rank: my rank in composite order (compose_group in icetRadixkrCompose)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ outputs:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fills info with step, split_factor, has_image, and partition_index for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ each round.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void radixkrGetPartitionIndices(radixkrInfo info,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt group_rank)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt step; /* step size in rank for a lattice direction */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt total_partitions;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt current_group_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt current_round;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt max_image_split;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_MAX_IMAGE_SPLIT, &max_image_split);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ total_partitions = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Procs with the same image partition are step ranks from each other. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ step = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ current_group_size = group_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ current_round = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ while (current_round < info.num_rounds) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrRoundInfo *round_info = &info.rounds[current_round];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt split;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt next_step = step*round_info->k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt next_group_size = current_group_size / round_info->k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt end_of_groups = next_step*next_group_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt first_rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ first_rank = group_rank % step + (group_rank/next_step)*next_step;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (first_rank >= end_of_groups) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ first_rank -= next_step;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((max_image_split < 1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ || (total_partitions * round_info->k <= max_image_split)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ split = round_info->k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ split = max_image_split/total_partitions;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ total_partitions *= split;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info->split_factor = split;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info->first_rank = first_rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info->partition_index = (group_rank - first_rank)/step;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info->last_partition = ((first_rank+next_step) >= end_of_groups);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info->step = step;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ current_group_size = next_group_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ step = next_step;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* The has_image test must follow the changes to current_group_size and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ step so that the group sizes gets rounded and the local rank will
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pop out of the last partition. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info->has_image = (group_rank < (step * current_group_size));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info->has_image &= (round_info->partition_index < split);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ current_round++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static radixkrInfo radixkrGetK(IceTInt compose_group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt group_rank)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Divide the world size into groups that are closest to the magic k
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ value. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrInfo info;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt magic_k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt max_num_k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt next_divide;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Special case of when compose_group_size == 1. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (compose_group_size < 2) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info.rounds = icetGetStateBuffer(RADIXKR_FACTORS_ARRAY_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sizeof(radixkrRoundInfo) * 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info.rounds[0].k = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info.rounds[0].r = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info.rounds[0].step = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info.rounds[0].split_factor = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info.rounds[0].has_image = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info.rounds[0].partition_index = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info.num_rounds = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return info;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info.num_rounds = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_MAGIC_K, &magic_k);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* The maximum number of factors possible is the floor of log base 2. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ max_num_k = radixkrFindFloorLog2(compose_group_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info.rounds = icetGetStateBuffer(RADIXKR_FACTORS_ARRAY_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sizeof(radixkrRoundInfo) * max_num_k);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ next_divide = compose_group_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ while (next_divide > 1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt next_k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt next_r;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (next_divide > magic_k) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* First guess is the magic k. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ next_k = magic_k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ next_r = next_divide % magic_k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Can't do better than doing direct send. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ next_k = next_divide;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ next_r = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* If the k value we picked is not a perfect factor, try to find
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * another value that is a perfect factor or has a smaller remainder.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (next_r > 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt try_k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (try_k = magic_k-1; try_k >= 2; try_k--) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt try_r = next_divide % try_k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (try_r < next_r) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ next_k = try_k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ next_r = try_r;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (next_r == 0) { break; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Set the k value in the array. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info.rounds[info.num_rounds].k = next_k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info.rounds[info.num_rounds].r = next_r;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ next_divide /= next_k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info.num_rounds++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (info.num_rounds > max_num_k) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Somehow we got more factors than possible.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Sanity check to make sure that the k's actually multiply to the number
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * of processes. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt product = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt round;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (round = info.num_rounds-1; round >= 0; --round) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ product = product*info.rounds[round].k + info.rounds[round].r;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (product != compose_group_size) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Product of k's not equal to number of processes.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrGetPartitionIndices(info, compose_group_size, group_rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return info;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* radixkrGetFinalPartitionIndex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ After radix-k completes on a group of size p, the image is partitioned into
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p pieces (with a caveat for the maximum number of partitions and remainder).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ This function finds the index for the final partition (with respect to all
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partitions, not just one within a round) for a given rank.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ inputs:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info: information about rounds
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ returns:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ index of final global partition. -1 if this process does not end up with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ a piece.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTInt radixkrGetFinalPartitionIndex(const radixkrInfo *info)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt current_round;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt partition_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_index = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (current_round = 0; current_round < info->num_rounds; current_round++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const radixkrRoundInfo *r = &info->rounds[current_round];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (r->has_image) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_index *= r->split_factor;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_index += r->partition_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else /* !r->has_image */ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* local process has no partition */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return partition_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* radixkrGetTotalNumPartitions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ After radix-kr completes on a group of size p, the image is partitioned into
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p pieces with some set maximum. This function finds the index for the final
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition (with respect to all partitions, not just one within a round) for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ a given rank.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ inputs:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info: information about rounds
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ returns:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ total number of partitions created
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTInt radixkrGetTotalNumPartitions(const radixkrInfo *info)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt current_round;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt num_partitions;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ num_partitions = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (current_round = 0; current_round < info->num_rounds; current_round++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ num_partitions *= info->rounds[current_round].split_factor;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return num_partitions;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* radixkrGetGroupRankForFinalPartitionIndex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ After radix-kr completes on a group of size p, the image is partitioned into
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p pieces. This function finds the group rank for the given index of the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ final partition. This function is the inverse if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrGetFinalPartitionIndex.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ inputs:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info: information about rounds
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_index: index of final global partition
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ returns:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ group rank holding partition_index
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTInt radixkrGetGroupRankForFinalPartitionIndex(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const radixkrInfo *info, IceTInt partition_index)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt current_round;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt partition_up_to_round;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt group_rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_up_to_round = partition_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ group_rank = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (current_round = info->num_rounds - 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ current_round >= 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ current_round--) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt step = info->rounds[current_round].step;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt split = info->rounds[current_round].split_factor;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ group_rank += step * (partition_up_to_round % split);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_up_to_round /= split;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return group_rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* radixkrGetPartners
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ gets the ranks of my trading partners
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ inputs:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info: structure with information on the current round
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ remaining_partitions: Number of pieces the image will be split into by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ the end of the algorithm.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ compose_group: array of world ranks representing the group of processes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ participating in compositing (passed into icetRadixkrCompose)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ group_rank: Index in compose_group that represents me
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ start_size: Size of image partition that is being divided in current_round
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ output:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partner_group: Structure of information about the group of processes that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ are partnering in this round.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static radixkrPartnerGroupInfo radixkrGetPartners(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const radixkrRoundInfo *round_info,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt remaining_partitions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType start_size)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt current_k = round_info->k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt current_r = round_info->r;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt split_factor = round_info->split_factor;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt step = round_info->step;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrPartnerGroupInfo p_group;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt num_partners;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean receiving_data;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean sending_data;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTVoid *recv_buf_pool;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTVoid *send_buf_pool;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType partition_num_pixels;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType sparse_image_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt i;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ num_partners = current_k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (round_info->last_partition) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ num_partners += current_r;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p_group.partners = icetGetStateBuffer(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RADIXKR_PARTITION_INFO_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sizeof(radixkrPartnerInfo) * num_partners);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p_group.num_partners = num_partners;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Allocate arrays that can be used as send/receive buffers. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ receiving_data = round_info->has_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (split_factor > 1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_num_pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ = icetSparseImageSplitPartitionNumPixels(start_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ split_factor,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ remaining_partitions);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sending_data = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Not really splitting image, and the receiver does not need to send
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * at all. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_num_pixels = start_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sending_data = !receiving_data;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sparse_image_size = icetSparseImageBufferSize(partition_num_pixels, 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (receiving_data) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ recv_buf_pool = icetGetStateBuffer(RADIXKR_RECEIVE_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sparse_image_size * num_partners);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ recv_buf_pool = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (sending_data) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Only need send buff when splitting, always need when splitting. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ send_buf_pool = icetGetStateBuffer(RADIXKR_SEND_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sparse_image_size * split_factor);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ send_buf_pool = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (i = 0; i < num_partners; i++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrPartnerInfo *p = &p_group.partners[i];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt partner_group_rank = round_info->first_rank + i*step;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->rank = compose_group[partner_group_rank];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* To be filled later. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->offset = -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (receiving_data) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->receiveBuffer = ((IceTByte*)recv_buf_pool + i*sparse_image_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->receiveBuffer = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (sending_data && (i < split_factor)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTVoid *send_buffer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ = ((IceTByte*)send_buf_pool + i*sparse_image_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->sendImage = icetSparseImageAssignBuffer(send_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_num_pixels, 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->sendImage = icetSparseImageNull();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->receiveImage = icetSparseImageNull();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->compositeLevel = -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return p_group;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* As applicable, posts an asynchronous receive for each process from which
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ we are receiving an image piece. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTCommRequest *radixkrPostReceives(radixkrPartnerGroupInfo p_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const radixkrRoundInfo *round_info,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt current_round,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt remaining_partitions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType start_size)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommRequest *receive_requests;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType partition_num_pixels;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType sparse_image_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt tag;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt i;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* If not collecting any image partition, post no receives. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!round_info->has_image) { return NULL; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ receive_requests =icetGetStateBuffer(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RADIXKR_RECEIVE_REQUEST_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p_group.num_partners * sizeof(IceTCommRequest));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (round_info->split_factor) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_num_pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ = icetSparseImageSplitPartitionNumPixels(start_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info->split_factor,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ remaining_partitions);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_num_pixels = start_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sparse_image_size = icetSparseImageBufferSize(partition_num_pixels, 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tag = RADIXKR_SWAP_IMAGE_TAG_START + current_round;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (i = 0; i < p_group.num_partners; i++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrPartnerInfo *p = &p_group.partners[i];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (i != round_info->partition_index) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ receive_requests[i] = icetCommIrecv(p->receiveBuffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sparse_image_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_BYTE,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->rank,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tag);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->compositeLevel = -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* No need to send to myself. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ receive_requests[i] = ICET_COMM_REQUEST_NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return receive_requests;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* As applicable, posts an asynchronous send for each process to which we are
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sending an image piece. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTCommRequest *radixkrPostSends(radixkrPartnerGroupInfo p_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const radixkrRoundInfo *round_info,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt current_round,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt remaining_partitions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType start_offset,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTSparseImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommRequest *send_requests;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *piece_offsets;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage *image_pieces;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt tag;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt i;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tag = RADIXKR_SWAP_IMAGE_TAG_START + current_round;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (round_info->split_factor > 1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ send_requests=icetGetStateBuffer(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RADIXKR_SEND_REQUEST_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info->split_factor * sizeof(IceTCommRequest));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ piece_offsets = icetGetStateBuffer(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RADIXKR_SPLIT_OFFSET_ARRAY_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info->split_factor * sizeof(IceTInt));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image_pieces = icetGetStateBuffer(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RADIXKR_SPLIT_IMAGE_ARRAY_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info->split_factor * sizeof(IceTSparseImage));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (i = 0; i < round_info->split_factor; i++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image_pieces[i] = p_group.partners[i].sendImage;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSparseImageSplit(image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ start_offset,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info->split_factor,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ remaining_partitions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image_pieces,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ piece_offsets);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* The pivot for loop arranges the sends to happen in an order such that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ those to be composited first in their destinations will be sent
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ first. This serves little purpose other than to try to stagger the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ order of sending images so that not everyone sends to the same
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ process first. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ BEGIN_PIVOT_FOR(i,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ 0,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info->partition_index % round_info->split_factor,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info->split_factor) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrPartnerInfo *p = &p_group.partners[i];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->offset = piece_offsets[i];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (i != round_info->partition_index) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTVoid *package_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType package_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSparseImagePackageForSend(image_pieces[i],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ &package_buffer, &package_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ send_requests[i] = icetCommIsend(package_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ package_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_BYTE,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->rank,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tag);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Implicitly send to myself. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ send_requests[i] = ICET_COMM_REQUEST_NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->receiveImage = p->sendImage;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->compositeLevel = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } END_PIVOT_FOR();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else { /* round_info->split_factor == 1 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrPartnerInfo *p = &p_group.partners[round_info->partition_index];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ send_requests = icetGetStateBuffer(RADIXKR_SEND_REQUEST_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sizeof(IceTCommRequest));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (round_info->has_image) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ send_requests[0] = ICET_COMM_REQUEST_NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->receiveImage = p->sendImage = image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->offset = start_offset;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->compositeLevel = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTVoid *package_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType package_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt recv_rank = p_group.partners[0].rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSparseImagePackageForSend(image,&package_buffer,&package_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ send_requests[0] = icetCommIsend(package_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ package_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_BYTE,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ recv_rank,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tag);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->offset = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return send_requests;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* When compositing incoming images, we pair up the images and composite in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ a tree. This minimizes the amount of times non-overlapping pixels need
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to be copied. Returns true when all images are composited */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTBoolean radixkrTryCompositeIncoming(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrPartnerGroupInfo p_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt incoming_index,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage *spare_image_p,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage final_image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt num_partners = p_group.num_partners;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrPartnerInfo *partners = p_group.partners;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage spare_image = *spare_image_p;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt to_composite_index = incoming_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ while (ICET_TRUE) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt level = partners[to_composite_index].compositeLevel;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt dist_to_sibling = (1 << level);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt subtree_size = (dist_to_sibling << 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt front_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt back_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (to_composite_index%subtree_size == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ front_index = to_composite_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ back_index = to_composite_index + dist_to_sibling;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (back_index >= num_partners) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* This image has no partner at this level. Just promote
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ the level and continue. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (front_index == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Special case. When index 0 has no partner, we must
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ be at the top of the tree and we are done. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partners[to_composite_index].compositeLevel++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ continue;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ back_index = to_composite_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ front_index = to_composite_index - dist_to_sibling;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ( partners[front_index].compositeLevel
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ != partners[back_index].compositeLevel ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Paired images are not on the same level. Cannot composite
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ until more images come in. We are done for now. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((front_index == 0) && (subtree_size >= num_partners)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* This will be the last image composited. Composite to final
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ location. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ spare_image = final_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCompressedCompressedComposite(partners[front_index].receiveImage,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partners[back_index].receiveImage,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ spare_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrSwapImages(&partners[front_index].receiveImage, &spare_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (icetSparseImageEqual(spare_image, final_image)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Special case, front image was sharing buffer with final.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Use back image for next spare. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ spare_image = partners[back_index].receiveImage;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partners[back_index].receiveImage = icetSparseImageNull();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partners[front_index].compositeLevel++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to_composite_index = front_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *spare_image_p = spare_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ((1 << partners[0].compositeLevel) >= num_partners);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void radixkrCompositeIncomingImages(radixkrPartnerGroupInfo p_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommRequest *receive_requests,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const radixkrRoundInfo *round_info,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrPartnerInfo *partners = p_group.partners;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt num_partners = p_group.num_partners;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrPartnerInfo *me = &partners[round_info->partition_index];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage spare_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt total_composites;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean composites_done;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* If not receiving an image, return right away. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!round_info->has_image) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Regardless of order, there are num_partners-1 composite operations to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ perform. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ total_composites = num_partners - 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* We will be reusing buffers like crazy, but we'll need at least one more
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for the first composite, assuming we have at least two composites. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ width = icetSparseImageGetWidth(me->receiveImage);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ height = icetSparseImageGetHeight(me->receiveImage);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (total_composites >= 2) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ spare_image = icetGetStateBufferSparseImage(RADIXKR_SPARE_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ spare_image = icetSparseImageNull();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Grumble. Stupid special case where there is only one composite and we
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ want the result to go in the same image as my receive image (which can
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ happen when not splitting). */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (icetSparseImageEqual(me->receiveImage,image) && (total_composites < 2)){
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ spare_image = icetGetStateBufferSparseImage(RADIXKR_SPARE_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSparseImageCopyPixels(me->receiveImage,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ 0,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ width*height,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ spare_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ me->receiveImage = spare_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Start by trying to composite the implicit receive from myself. It won't
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ actually composite anything, but it may change the composite level. It
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ will also defensively set composites_done correctly. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ composites_done = radixkrTryCompositeIncoming(p_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info->partition_index,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ &spare_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ while (!composites_done) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt receive_idx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrPartnerInfo *receiver;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Wait for an image to come in. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ receive_idx = icetCommWaitany(num_partners, receive_requests);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ receiver = &partners[receive_idx];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ receiver->compositeLevel = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ receiver->receiveImage
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ = icetSparseImageUnpackageFromReceive(receiver->receiveBuffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ( (icetSparseImageGetWidth(receiver->receiveImage) != width)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ || (icetSparseImageGetHeight(receiver->receiveImage) != height) ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Radix-kr received image with wrong size.",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Try to composite that image. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ composites_done = radixkrTryCompositeIncoming(p_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ receive_idx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ &spare_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void icetRadixkrCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt image_dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage input_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage *result_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType *piece_offset)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrInfo info = { NULL, 0 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType my_offset;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt current_round;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt total_num_partitions;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt remaining_partitions;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt group_rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean use_interlace;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage working_image = input_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType original_image_size = icetSparseImageGetNumPixels(input_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* This hint of an argument is ignored. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (void)image_dest;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseDebug("In radix-kr compose");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Find your rank in your group. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ group_rank = icetFindMyRankInGroup(compose_group, group_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (group_rank < 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Local process not in compose_group?",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *result_image = icetSparseImageNull();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *piece_offset = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (group_size == 1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* I am the only process in the group. No compositing to be done.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Just return and the image will be complete. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *result_image = input_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *piece_offset = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info = radixkrGetK(group_size, group_rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* num_rounds > 0 is assumed several places throughout this function */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (info.num_rounds <= 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRaiseError("Radix-kr has no rounds?", ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* IceT does some tricks with partitioning an image so that no matter what
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ order we do the divisions, we end up with the same partitions. To do
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ that, we need to know how many divisions are going to be created in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ all. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ total_num_partitions = radixkrGetTotalNumPartitions(&info);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Now that we know the total number of partitions, we can interlace the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ input image to improve load balancing. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ use_interlace = icetIsEnabled(ICET_INTERLACE_IMAGES);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ use_interlace &= (info.num_rounds > 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (use_interlace) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage interlaced_image = icetGetStateBufferSparseImage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RADIXKR_INTERLACED_IMAGE_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSparseImageGetWidth(working_image),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSparseImageGetHeight(working_image));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSparseImageInterlace(working_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ total_num_partitions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RADIXKR_SPLIT_OFFSET_ARRAY_BUFFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ interlaced_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ working_image = interlaced_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Any peer we communicate with in round i starts that round with a block of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ the same size as ours prior to splitting for sends/recvs. So we can
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ calculate the current round's peer sizes based on our current size and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ the split values in the info structure. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ my_offset = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ remaining_partitions = total_num_partitions;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (current_round = 0; current_round < info.num_rounds; current_round++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType my_size = icetSparseImageGetNumPixels(working_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const radixkrRoundInfo *round_info = &info.rounds[current_round];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrPartnerGroupInfo p_group
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ = radixkrGetPartners(round_info,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ remaining_partitions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ my_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommRequest *receive_requests;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommRequest *send_requests;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ receive_requests = radixkrPostReceives(p_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ current_round,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ remaining_partitions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ my_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ send_requests = radixkrPostSends(p_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ current_round,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ remaining_partitions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ my_offset,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ working_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrCompositeIncomingImages(p_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ receive_requests,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ round_info,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ working_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCommWaitall(round_info->split_factor, send_requests);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ my_offset = p_group.partners[round_info->partition_index].offset;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (round_info->has_image) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ remaining_partitions /= round_info->split_factor;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSparseImageSetDimensions(working_image, 0, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } /* for all rounds */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* If we interlaced the image and are actually returning something,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ correct the offset. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (use_interlace && (icetSparseImageGetNumPixels(working_image) > 0)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt partition_index = radixkrGetFinalPartitionIndex(&info);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *piece_offset = icetGetInterlaceOffset(partition_index,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ total_num_partitions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ original_image_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *piece_offset = my_offset;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *result_image = working_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTBoolean radixkrTryPartitionLookup(IceTInt group_size)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *partition_assignments;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt group_rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt partition_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt num_partitions;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_assignments = malloc(group_size * sizeof(IceTInt));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (partition_index = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_index < group_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_index++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_assignments[partition_index] = -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ num_partitions = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (group_rank = 0; group_rank < group_size; group_rank++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrInfo info;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank_assignment;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info = radixkrGetK(group_size, group_rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_index = radixkrGetFinalPartitionIndex(&info);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Check if this rank has no partition. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (partition_index < 0) { continue; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ num_partitions++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (group_size <= partition_index) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("Invalid partition for rank %d. Got partition %d.\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ group_rank, partition_index);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (partition_assignments[partition_index] != -1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("Both ranks %d and %d report assigned partition %d.\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ group_rank,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_assignments[partition_index],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_index);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ partition_assignments[partition_index] = group_rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ rank_assignment
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ = radixkrGetGroupRankForFinalPartitionIndex(&info, partition_index);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rank_assignment != group_rank) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("Rank %d reports partition %d, but partition reports rank %d.\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ group_rank, partition_index, rank_assignment);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrInfo info;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ info = radixkrGetK(group_size, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (num_partitions != radixkrGetTotalNumPartitions(&info)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("Expected %d partitions, found %d\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ radixkrGetTotalNumPartitions(&info),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ num_partitions);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt max_image_split;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_MAX_IMAGE_SPLIT, &max_image_split);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (num_partitions > max_image_split) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("Got %d partitions. Expected no more than %d\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ num_partitions, max_image_split);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ free(partition_assignments);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ICET_EXPORT IceTBoolean icetRadixkrPartitionLookupUnitTest(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt group_sizes_to_try[] = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ 2, /* Base case. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_MAGIC_K_DEFAULT, /* Largest direct send. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_MAGIC_K_DEFAULT*2, /* Changing group sizes. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_MAGIC_K_DEFAULT*ICET_MAGIC_K_DEFAULT*37,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Odd factor past some rounds. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ 1024, /* Large(ish) power of two. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ 576, /* Factors into 2 and 3. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ 509 /* Prime. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt num_group_sizes_to_try
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ = sizeof(group_sizes_to_try)/sizeof(IceTInt);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt group_size_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("\nTesting rank/partition mapping.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (group_size_index = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ group_size_index < num_group_sizes_to_try;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ group_size_index++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt group_size = group_sizes_to_try[group_size_index];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt max_image_split;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("Trying size %d\n", group_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (max_image_split = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ max_image_split/2 < group_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ max_image_split *= 2) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStateSetInteger(ICET_MAX_IMAGE_SPLIT, max_image_split);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf(" Maximum num splits set to %d\n", max_image_split);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!radixkrTryPartitionLookup(group_size)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/strategies/select.c src/strategies/select.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 80c8516..09bb53c 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/strategies/select.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/strategies/select.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -34,6 +34,12 @@ extern void icetBswapCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSparseImage input_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSparseImage *result_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType *piece_offset);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void icetBswapFoldingCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt image_dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage input_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage *result_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType *piece_offset);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern void icetTreeCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt image_dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -46,6 +52,12 @@ extern void icetRadixkCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSparseImage input_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSparseImage *result_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType *piece_offset);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern void icetRadixkrCompose(const IceTInt *compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt image_dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage input_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSparseImage *result_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType *piece_offset);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /*==================================================================*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -132,6 +144,8 @@ IceTBoolean icetSingleImageStrategyValid(IceTEnum strategy)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case ICET_SINGLE_IMAGE_STRATEGY_BSWAP:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case ICET_SINGLE_IMAGE_STRATEGY_TREE:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case ICET_SINGLE_IMAGE_STRATEGY_RADIXK:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_SINGLE_IMAGE_STRATEGY_RADIXKR:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_SINGLE_IMAGE_STRATEGY_BSWAP_FOLDING:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -145,6 +159,8 @@ const char *icetSingleImageStrategyNameFromEnum(IceTEnum strategy)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case ICET_SINGLE_IMAGE_STRATEGY_BSWAP: return "Binary Swap";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case ICET_SINGLE_IMAGE_STRATEGY_TREE: return "Binary Tree";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case ICET_SINGLE_IMAGE_STRATEGY_RADIXK: return "Radix-k";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_SINGLE_IMAGE_STRATEGY_RADIXKR: return "Radix-kr";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_SINGLE_IMAGE_STRATEGY_BSWAP_FOLDING: return "Folded Binary Swap";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetRaiseError("Invalid single image strategy.", ICET_INVALID_ENUM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return "<Invalid>";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -195,6 +211,22 @@ void icetInvokeSingleImageStrategy(IceTEnum strategy,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ result_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ piece_offset);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_SINGLE_IMAGE_STRATEGY_RADIXKR:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetRadixkrCompose(compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image_dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ input_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ piece_offset);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_SINGLE_IMAGE_STRATEGY_BSWAP_FOLDING:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetBswapFoldingCompose(compose_group,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ group_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image_dest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ input_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result_image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ piece_offset);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetRaiseError("Invalid single image strategy.", ICET_INVALID_ENUM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/strategies/split.c src/strategies/split.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 4cc66de..061c3d3 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/strategies/split.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/strategies/split.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -284,7 +284,9 @@ IceTImage icetSplitCompose(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tile_groups[num_tiles] = num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Figure out which tile I am assigned to. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for (my_tile = 0; rank >= tile_groups[my_tile+1]; my_tile++);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (my_tile = 0; rank >= tile_groups[my_tile+1]; my_tile++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Nothing to do. Just drop out of loop when my_tile is correct. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetRaiseDebug1("My tile is %d", my_tile);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ group_size = tile_groups[my_tile+1] - tile_groups[my_tile];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/BackgroundCorrect.c tests/BackgroundCorrect.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index deeb4ac..44366ce 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/BackgroundCorrect.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/BackgroundCorrect.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -13,7 +13,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceT.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevContext.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevImage.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -26,9 +26,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define PROC_REGION_WIDTH 10
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define PROC_REGION_HEIGHT 10
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-const IceTFloat g_background_color[4] = { 0.5, 0.5, 0.5, 1.0 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-const IceTFloat g_foreground_color[4] = { 0.0, 0.25, 0.5, 0.5 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-const IceTFloat g_blended_color[4] = { 0.25, 0.5, 0.75, 1.0 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static const IceTFloat g_background_color[4] = { 0.5, 0.5, 0.5, 1.0 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static const IceTFloat g_foreground_color[4] = { 0.0, 0.25, 0.5, 0.5 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static const IceTFloat g_blended_color[4] = { 0.25, 0.5, 0.75, 1.0 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTBoolean ColorsEqual(const IceTFloat *color1, const IceTFloat *color2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/BlankTiles.c tests/BlankTiles.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 59d727b..d78887a 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/BlankTiles.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/BlankTiles.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -9,7 +9,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *****************************************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTGL.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/BoundsBehindViewer.c tests/BoundsBehindViewer.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index a43592b..799c14a 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/BoundsBehindViewer.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/BoundsBehindViewer.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *****************************************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTGL.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/CMakeLists.txt tests/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 6a7be2b..c182367 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -5,44 +5,85 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ## This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-IF (ICET_USE_OPENGL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- FIND_PACKAGE(GLUT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IF (GLUT_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- SET(ICET_TESTS_USE_OPENGL 1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ENDIF (GLUT_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-ENDIF (ICET_USE_OPENGL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IF (ICET_USE_OPENGL AND NOT ICET_USE_OFFSCREEN_EGL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SET(ICET_OPENGL_WINDOW_LIBRARY GLUT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CACHE STRING
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "The name of the library the IceT tests will use to create windows for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++OpenGL contexts. Supported values are GLUT and GLFW."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SET_PROPERTY(CACHE ICET_OPENGL_WINDOW_LIBRARY
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PROPERTY STRINGS GLUT GLFW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MARK_AS_ADVANCED(ICET_OPENGL_WINDOW_LIBRARY)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IF (ICET_OPENGL_WINDOW_LIBRARY STREQUAL GLUT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ FIND_PACKAGE(GLUT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IF (GLUT_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ INCLUDE_DIRECTORIES(${GLUT_INCLUDE_DIR})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SET(ICET_TESTS_USE_OPENGL 1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SET(ICET_TESTS_USE_GLUT 1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ELSE (GLUT_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MESSAGE(STATUS "Cannot find GLUT library. OpenGL tests disabled.")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ENDIF (GLUT_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ELSEIF (ICET_OPENGL_WINDOW_LIBRARY STREQUAL GLFW)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ FIND_PACKAGE(GLFW)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IF (GLFW_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ INCLUDE_DIRECTORIES(${GLFW_INCLUDE_DIR})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SET(ICET_TESTS_USE_OPENGL 1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SET(ICET_TESTS_USE_GLFW 1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ELSE (GLFW_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MESSAGE(WARNING "Cannot find GLFW library. OpenGL tests disabled.")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ENDIF (GLFW_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ELSE ()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MESSAGE(SEND_ERROR "Invalid value for ICET_OPENGL_WINDOW_LIBRARY: ${ICET_OPENGL_WINDOW_LIBRARY}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ENDIF ()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ENDIF ()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IF (NOT ICET_TESTS_USE_OPENGL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- MESSAGE(STATUS "Most tests require ICET_USE_OPENGL and Glut. Those tests are disabled.")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MESSAGE(STATUS "Most tests require ICET_USE_OPENGL and GLUT or GLFW. Those tests are disabled.")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ENDIF (NOT ICET_TESTS_USE_OPENGL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-SET(MyTests
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++SET(IceTTestSrcs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ BackgroundCorrect.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CompressionSize.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ FloatingViewport.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Interlace.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MaxImageSplit.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ OddImageSizes.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ OddProcessCounts.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PreRender.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RadixkrUnitTests.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ RadixkUnitTests.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RenderEmpty.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SimpleTiming.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SparseImageCopy.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-IF (ICET_TESTS_USE_OPENGL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- SET(MyTests ${MyTests}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- BlankTiles.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- BoundsBehindViewer.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- DisplayNoDraw.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- RandomTransform.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- SimpleExample.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-ENDIF (ICET_TESTS_USE_OPENGL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++SET(IceTOpenGLTestSrcs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ BlankTiles.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ BoundsBehindViewer.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ DisplayNoDraw.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RandomTransform.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SimpleExample.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-SET(UTIL_SRCS init.c ppm.c)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++SET(UTIL_SRCS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ test_common.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ppm.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++SET(TEST_HEADERS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ test_codes.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ test_util.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ test_mpi.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ test_mpi_opengl.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++SET_SOURCE_FILES_PROPERTIES(${TEST_HEADERS}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PROPERTIES HEADER_ONLY TRUE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONFIGURE_FILE(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ${CMAKE_CURRENT_SOURCE_DIR}/test-config.h.in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ${CMAKE_CURRENT_BINARY_DIR}/test-config.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ${CMAKE_CURRENT_SOURCE_DIR}/test_config.h.in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ${CMAKE_CURRENT_BINARY_DIR}/test_config.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ INCLUDE_DIRECTORIES(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -50,23 +91,6 @@ INCLUDE_DIRECTORIES(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${CMAKE_CURRENT_BINARY_DIR}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-CREATE_TEST_SOURCELIST(Tests icetTests_mpi.c ${MyTests}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- EXTRA_INCLUDE mpi_comm.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- FUNCTION init_mpi_comm)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-ADD_EXECUTABLE(icetTests_mpi ${Tests} ${UTIL_SRCS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-TARGET_LINK_LIBRARIES(icetTests_mpi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTCore
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTMPI
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-IF (ICET_TESTS_USE_OPENGL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- TARGET_LINK_LIBRARIES(icetTests_mpi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTGL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ${OPENGL_glu_LIBRARY}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ${GLUT_LIBRARIES}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-ENDIF (ICET_TESTS_USE_OPENGL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IF (ICET_MPIRUN_EXE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(PRE_TEST_FLAGS ${ICET_MPIRUN_EXE} ${ICET_MPI_NUMPROC_FLAG} ${ICET_MPI_MAX_NUMPROCS} ${ICET_MPI_PREFLAGS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET(POST_TEST_FLAGS ${ICET_MPI_POSTFLAGS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -76,11 +100,22 @@ SET(ICET_TEST_FLAGS "" CACHE STRING "Arguments given to the test program. These
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MARK_AS_ADVANCED(ICET_TEST_FLAGS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SEPARATE_ARGUMENTS(ICET_TEST_FLAGS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-FOREACH (test ${MyTests})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++CREATE_TEST_SOURCELIST(Tests icetTests_mpi.c ${IceTTestSrcs}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ EXTRA_INCLUDE test_mpi.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ FUNCTION init_mpi)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ADD_EXECUTABLE(icetTests_mpi ${Tests} ${UTIL_SRCS} ${TEST_HEADERS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++TARGET_LINK_LIBRARIES(icetTests_mpi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCore
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTMPI
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++FOREACH (test ${IceTTestSrcs})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ GET_FILENAME_COMPONENT(TName ${test} NAME_WE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ADD_TEST(IceT${TName}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ADD_TEST(NAME IceT${TName}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ COMMAND
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${PRE_TEST_FLAGS}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ${C_TEST_PATH}/icetTests_mpi ${ICET_TEST_FLAGS} ${TName}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $<TARGET_FILE:icetTests_mpi> ${ICET_TEST_FLAGS} ${TName}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${POST_TEST_FLAGS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SET_TESTS_PROPERTIES(IceT${TName}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -93,8 +128,46 @@ FOREACH (test ${MyTests})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ENDFOREACH(test)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-IF (WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ADD_CUSTOM_TARGET(logclean erase log.???? *.ppm)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-ELSE (WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ADD_CUSTOM_TARGET(logclean rm -f log.???? *.ppm core.*)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-ENDIF (WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IF (ICET_TESTS_USE_OPENGL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CREATE_TEST_SOURCELIST(OpenGLTests icetTests_mpi_opengl.c ${IceTOpenGLTestSrcs}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ EXTRA_INCLUDE test_mpi_opengl.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ FUNCTION init_mpi_opengl)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ADD_EXECUTABLE(icetTests_mpi_opengl ${OpenGLTests} ${UTIL_SRCS} ${TEST_HEADERS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ TARGET_LINK_LIBRARIES(icetTests_mpi_opengl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCore
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTMPI
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTGL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IF (ICET_TESTS_USE_GLUT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ TARGET_LINK_LIBRARIES(icetTests_mpi_opengl ${GLUT_LIBRARIES})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ENDIF (ICET_TESTS_USE_GLUT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IF (ICET_TESTS_USE_GLFW)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ TARGET_LINK_LIBRARIES(icetTests_mpi_opengl ${GLFW_LIBRARY})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ENDIF (ICET_TESTS_USE_GLFW)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ FOREACH (test ${IceTOpenGLTestSrcs})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ GET_FILENAME_COMPONENT(TName ${test} NAME_WE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ADD_TEST(NAME IceT${TName}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ COMMAND
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ${PRE_TEST_FLAGS}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $<TARGET_FILE:icetTests_mpi_opengl> ${ICET_TEST_FLAGS} ${TName}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ${POST_TEST_FLAGS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SET_TESTS_PROPERTIES(IceT${TName}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PROPERTIES FAIL_REGULAR_EXPRESSION
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ":ERROR:;TEST NOT RUN;TEST NOT PASSED;TEST FAILED"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SET_TESTS_PROPERTIES(IceT${TName}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PROPERTIES PASS_REGULAR_EXPRESSION "Test Passed"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ENDFOREACH(test)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ENDIF (ICET_TESTS_USE_OPENGL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ADD_CUSTOM_TARGET(logclean
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ${CMAKE_COMMAND} -E remove
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ${CMAKE_CURRENT_BINARY_DIR}/log.????
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ${CMAKE_CURRENT_BINARY_DIR}/*.ppm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ${CMAKE_CURRENT_BINARY_DIR}/core.*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/CompressionSize.c tests/CompressionSize.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 949cc36..a530b82 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/CompressionSize.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/CompressionSize.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *****************************************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevImage.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevState.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/DisplayNoDraw.c tests/DisplayNoDraw.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 4d0cfc2..af796e4 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/DisplayNoDraw.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/DisplayNoDraw.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -16,7 +16,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTGL.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdio.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/FloatingViewport.c tests/FloatingViewport.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+new file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0000000..061a474
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/FloatingViewport.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,283 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* -*- c -*- *****************************************************************
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** Copyright (C) 2014 Sandia Corporation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** the U.S. Government retains certain rights in this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++**
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++**
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** This test makes sure that the floating viewport feature is working as
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** expected. It will make sure that the render is called only once for the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** floating viewport and that the image gets renderd correctly.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++*****************************************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceT.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceTDevCommunication.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceTDevMatrix.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdio.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static const IceTFloat g_background_color[4] = { 0.5, 0.5, 0.5, 1.0 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static const IceTFloat g_foreground_color[4] = { 0.0, 0.25, 0.5, 1.0 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTInt g_num_render_callbacks;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTBoolean ColorsEqual(const IceTFloat *color1, const IceTFloat *color2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = (color1[0] == color2[0]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result &= (color1[1] == color2[1]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result &= (color1[2] == color2[2]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result &= (color1[3] == color2[3]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTBoolean CheckPixel(const IceTImage image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType pixel,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTFloat *expected_color)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTFloat *colors = icetImageGetColorcf(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!ColorsEqual(colors + 4*pixel, expected_color)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTUByte *buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ char filename[255];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("BAD PIXEL %d\n", pixel);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank(" Expected %f %f %f %f\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ expected_color[0],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ expected_color[1],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ expected_color[2],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ expected_color[3]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank(" Got %f %f %f %f\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ colors[4*pixel + 0],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ colors[4*pixel + 1],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ colors[4*pixel + 2],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ colors[4*pixel + 3]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ buffer = malloc(4*icetImageGetWidth(image)*icetImageGetHeight(image));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetImageCopyColorub(image, buffer, ICET_IMAGE_COLOR_RGBA_UBYTE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sprintf(filename, "FloatingViewport_%d.ppm", rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ write_ppm(filename,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetImageGetWidth(image),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetImageGetHeight(image));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ free(buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void RenderFloatingViewport(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTDouble *modelview_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTFloat *background_color,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt *readback_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTImage result)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTFloat *colors;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* To remove warning. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (void)projection_matrix;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (void)modelview_matrix;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (void)background_color;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("Rendering viewport %d %d %d %d\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ readback_viewport[0],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ readback_viewport[1],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ readback_viewport[2],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ readback_viewport[3]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_num_render_callbacks++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ width = icetImageGetWidth(result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ height = icetImageGetHeight(result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ colors = icetImageGetColorf(result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Set all pixels in the readback_viewport. IceT will ignore the rest. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType line_start = width*readback_viewport[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType line;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (line = 0; line < readback_viewport[3]; line++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType pixel = line_start + readback_viewport[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType column;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (column = 0; column < readback_viewport[2]; column++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ colors[4*pixel + 0] = g_foreground_color[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ colors[4*pixel + 1] = g_foreground_color[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ colors[4*pixel + 2] = g_foreground_color[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ colors[4*pixel + 3] = g_foreground_color[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pixel++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ line_start += width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void FloatingViewportSetupRender(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCompositeMode(ICET_COMPOSITE_MODE_BLEND);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSetColorFormat(ICET_IMAGE_COLOR_RGBA_FLOAT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSetDepthFormat(ICET_IMAGE_DEPTH_NONE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetDisable(ICET_ORDERED_COMPOSITE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetEnable(ICET_CORRECT_COLORED_BACKGROUND);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* The strategy should not matter for this test. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStrategy(ICET_STRATEGY_SEQUENTIAL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetDrawCallback(RenderFloatingViewport);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetResetTiles();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetAddTile(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetAddTile(SCREEN_WIDTH, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void FloatingViewportGetMatrices(IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble *modelview_matrix)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Identity matrices make it easy to predict where geometry is projected. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetMatrixIdentity(projection_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetMatrixIdentity(modelview_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* The geometry is a square straddling the two tiles. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetBoundingBoxd(-0.25, 0.25, -0.5, 0.5, -0.5, 0.5);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTBoolean FloatingViewportCheckImage(const IceTImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType pixel;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType count;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Display ranks are 0 and 1. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rank > 1) { return ICET_TRUE; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ width = icetImageGetWidth(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ height = icetImageGetHeight(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Not that in these checks we avoid problems with floating point
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * inaccuracies by only checking parts well within regions. For example,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * we expect the bottom 25% of an image to be background, but we only
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * check the bottom 20%. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Bottom 25% of both images should be background. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pixel = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (count = 0; count < width*(height/5); count++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!CheckPixel(image, pixel, g_background_color)) {return ICET_FALSE;}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pixel++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Top 25% of both images should be background. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pixel = width*(4*height/5);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (count = 0; count < width*(height/5); count++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!CheckPixel(image, pixel, g_background_color)) {return ICET_FALSE;}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pixel++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* In the middle 50%, the left 75% is background on rank 0 and the right
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * 75% is background on rank 1. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pixel = width*(2*height/5);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rank == 1) { pixel += width - 3*width/5; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (count = 0; count < height/5; count++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType count2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (count2 = 0; count2 < 3*width/5; count2++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!CheckPixel(image, pixel+count2, g_background_color)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pixel += width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* In the middle 50%, the right 25% is foreground on rank 0 and the left
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * 25% is foreground on rank 1. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pixel = width*(2*height/5);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rank == 0) { pixel += width - width/5; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (count = 0; count < height/5; count++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType count2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (count2 = 0; count2 < width/5; count2++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!CheckPixel(image, pixel+count2, g_foreground_color)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pixel += width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTBoolean FloatingViewportTryRender(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble projection_matrix[16];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble modelview_matrix[16];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTImage image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ FloatingViewportSetupRender();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ FloatingViewportGetMatrices(projection_matrix, modelview_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_num_render_callbacks = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image = icetDrawFrame(projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ modelview_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_background_color);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (g_num_render_callbacks != 1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("**** Rendering callback not called expected number of times. ****\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("Expected 1 call, got %d\n", g_num_render_callbacks);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return FloatingViewportCheckImage(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int FloatingViewportTryMultipleRenders(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean success = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt trial;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (trial = 0; trial < 5; trial++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat("Trial render %d\n", trial);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ success &= FloatingViewportTryRender();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (success) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return TEST_PASSED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return TEST_FAILED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int FloatingViewportRun(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Check to make sure floating viewport is on by default. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!icetIsEnabled(ICET_FLOATING_VIEWPORT)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat("The floating viewport option is not on by default.");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return TEST_FAILED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_NUM_PROCESSES, &num_proc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (num_proc < 2) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("Need at least two processes to run FloatingViewport test.");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return TEST_NOT_RUN;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return FloatingViewportTryMultipleRenders();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int FloatingViewport(int argc, char *argv[])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* To remove warning. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (void)argc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (void)argv;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return run_test(FloatingViewportRun);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/Interlace.c tests/Interlace.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 3e628ec..2b9ff97 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/Interlace.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/Interlace.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -11,7 +11,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *****************************************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevImage.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/MaxImageSplit.c tests/MaxImageSplit.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 5a7dcfa..064dc14 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/MaxImageSplit.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/MaxImageSplit.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -12,7 +12,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceT.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevContext.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevMatrix.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -183,7 +183,7 @@ static int MaxImageSplitCheckImage(const IceTImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt x, y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (y = 0; y < PROC_REGION_HEIGHT; y++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (x = 0; x < PROC_REGION_WIDTH; x++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (*pixel != proc) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (*pixel != (IceTUInt)proc) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printrank("**** Found bad pixel!!!! ****\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printrank("Region for process %d, x = %d, y = %d\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ proc, x, y);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/OddImageSizes.c tests/OddImageSizes.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 33d8e3d..5e07a54 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/OddImageSizes.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/OddImageSizes.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -11,7 +11,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceT.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdio.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/OddProcessCounts.c tests/OddProcessCounts.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 423044f..7615972 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/OddProcessCounts.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/OddProcessCounts.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -11,7 +11,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceT.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevCommunication.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevState.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -86,7 +86,8 @@ static int OddProcessCountsTryCollectOptions(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetIntegerv(ICET_SINGLE_IMAGE_STRATEGY, &si_strategy);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (si_strategy == ICET_SINGLE_IMAGE_STRATEGY_RADIXK) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((si_strategy == ICET_SINGLE_IMAGE_STRATEGY_RADIXK)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ || (si_strategy == ICET_SINGLE_IMAGE_STRATEGY_RADIXKR)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt magic_k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/PreRender.c tests/PreRender.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+new file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0000000..05cd010
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/PreRender.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,310 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* -*- c -*- *****************************************************************
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** Copyright (C) 2014 Sandia Corporation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** the U.S. Government retains certain rights in this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++**
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++**
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** Tests the icetCompositeImage method to composite an image that has been
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** pre-rendered (as opposed to rendered on demand through callbacks).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++*****************************************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceT.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceTDevCommunication.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceTDevState.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdio.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <time.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTInt g_local_valid_pixel_viewport[4];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTInt *g_all_valid_pixel_viewports;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void SetUpTiles(IceTInt tile_dimension)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt tile_index = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt tile_x;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt tile_y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetResetTiles();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (tile_y = 0; tile_y < tile_dimension; tile_y++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (tile_x = 0; tile_x < tile_dimension; tile_x++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetAddTile(tile_x*SCREEN_WIDTH,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tile_y*SCREEN_HEIGHT,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SCREEN_WIDTH,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SCREEN_HEIGHT,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tile_index);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tile_index++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MakeValidPixelViewports()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt global_viewport[4];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt global_width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt global_height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt value1, value2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_GLOBAL_VIEWPORT, global_viewport);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ global_width = global_viewport[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ global_height = global_viewport[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ value1 = rand()%global_width; value2 = rand()%global_height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (value1 < value2) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_local_valid_pixel_viewport[0] = value1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_local_valid_pixel_viewport[2] = value2 - value1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_local_valid_pixel_viewport[0] = value2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_local_valid_pixel_viewport[2] = value1 - value2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ value1 = rand()%global_width; value2 = rand()%global_height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (value1 < value2) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_local_valid_pixel_viewport[1] = value1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_local_valid_pixel_viewport[3] = value2 - value1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_local_valid_pixel_viewport[1] = value2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_local_valid_pixel_viewport[3] = value1 - value2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCommAllgather(g_local_valid_pixel_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ 4,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_INT,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_all_valid_pixel_viewports);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void MakeImageBuffers(IceTUInt **color_buffer_p,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTFloat **depth_buffer_p)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTUInt *color_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTFloat *depth_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt global_viewport[4];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt x;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt pixel;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt left;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt right;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt bottom;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt top;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_GLOBAL_VIEWPORT, global_viewport);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ width = global_viewport[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ height = global_viewport[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_NUM_PROCESSES, &num_proc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ left = g_local_valid_pixel_viewport[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ right = left + g_local_valid_pixel_viewport[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ bottom = g_local_valid_pixel_viewport[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ top = bottom + g_local_valid_pixel_viewport[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color_buffer = malloc(width*height*sizeof(IceTUInt));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ depth_buffer = malloc(width*height*sizeof(IceTFloat));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pixel = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (y = 0; y < height; y++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (x = 0; x < width; x++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((x >= left) && (x < right) && (y >= bottom) && (y < top)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color_buffer[pixel] = rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ depth_buffer[pixel] = ((IceTFloat)rank)/num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color_buffer[pixel] = 0xDEADDEAD; /* garbage value */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pixel++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *color_buffer_p = color_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *depth_buffer_p = depth_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTBoolean CheckCompositedImage(const IceTImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt tile_displayed;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTUInt *color_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt *tile_viewport;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt local_x, local_y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt global_x, global_y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_VALID_PIXELS_TILE, &tile_displayed);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (tile_displayed < 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* No local tile. Nothing to compare. Just return success. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_NUM_PROCESSES, &num_proc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color_buffer = icetImageGetColorcui(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ width = icetImageGetWidth(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ height = icetImageGetHeight(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tile_viewport =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetUnsafeStateGetInteger(ICET_TILE_VIEWPORTS) + 4*tile_displayed;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((tile_viewport[2] != width) || (tile_viewport[3] != height)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("***** Tile width or height does not match image! *****\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("Tile: %d x %d\n", tile_viewport[2], tile_viewport[3]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("Image: %d x %d\n", width, height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (local_y = 0, global_y = tile_viewport[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ local_y < height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ local_y++, global_y++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (local_x = 0, global_x = tile_viewport[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ local_x < width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ local_x++, global_x++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTUInt image_value;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTUInt expected_value;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt proc_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image_value = color_buffer[local_x + local_y*width];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ expected_value = 0xFFFFFFFF;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (proc_index = 0; proc_index < num_proc; proc_index++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *proc_viewport =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_all_valid_pixel_viewports + 4*proc_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ( (global_x >= proc_viewport[0])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ && (global_x < proc_viewport[0]+proc_viewport[2])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ && (global_y >= proc_viewport[1])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ && (global_y < proc_viewport[1]+proc_viewport[3]) ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ expected_value = proc_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (image_value != expected_value) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("***** Got an unexpected value in the image *****\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("Located at pixel %d,%d (globally %d,%d)\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ local_x, local_y, global_x, global_y);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("Expected 0x%X. Got 0x%X\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ expected_value, image_value);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTBoolean PreRenderTryComposite(IceTUInt *color_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTFloat *depth_buffer)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTFloat background_color[4] = { 1.0, 1.0, 1.0, 1.0 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTImage image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSetColorFormat(ICET_IMAGE_COLOR_RGBA_UBYTE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSetDepthFormat(ICET_IMAGE_DEPTH_FLOAT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCompositeMode(ICET_COMPOSITE_MODE_Z_BUFFER);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetDisable(ICET_ORDERED_COMPOSITE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image = icetCompositeImage(color_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ depth_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_local_valid_pixel_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NULL,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NULL,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ background_color);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return CheckCompositedImage(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTBoolean PreRenderTryStrategy()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean success = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTUInt *color_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTFloat *depth_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt strategy_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MakeImageBuffers(&color_buffer, &depth_buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (strategy_index = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ strategy_index < STRATEGY_LIST_SIZE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ strategy_index++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStrategy(strategy_list[strategy_index]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat(" Using %s strategy.\n", icetGetStrategyName());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ success &= PreRenderTryComposite(color_buffer, depth_buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ free(color_buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ free(depth_buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return success;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTBoolean PreRenderTryTiles(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean success = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt tile_dimension;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_NUM_PROCESSES, &num_proc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (tile_dimension = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (tile_dimension <= 4) && (tile_dimension*tile_dimension <= num_proc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tile_dimension++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat("\nUsing %dx%d tiles\n", tile_dimension, tile_dimension);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SetUpTiles(tile_dimension);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MakeValidPixelViewports();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ success &= PreRenderTryStrategy();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return success;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int PreRenderRun(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ unsigned int seed;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_NUM_PROCESSES, &num_proc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_all_valid_pixel_viewports = malloc(4*num_proc*sizeof(IceTInt));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Establish a random seed. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rank == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt remote_process;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ seed = (int)time(NULL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat("Base seed = %u\n", seed);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ srand(seed);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (remote_process = 1; remote_process < num_proc; remote_process++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCommSend(&seed, 1, ICET_INT, remote_process, 29);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCommRecv(&seed, 1, ICET_INT, 0, 29);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ srand(seed + rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean success = PreRenderTryTiles();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ free(g_all_valid_pixel_viewports);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (success ? TEST_PASSED : TEST_FAILED);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int PreRender(int argc, char *argv[])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Suppress warning. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (void)argc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (void)argv;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return run_test(PreRenderRun);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/RadixkUnitTests.c tests/RadixkUnitTests.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index db06891..a159f6e 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/RadixkUnitTests.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/RadixkUnitTests.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,13 +10,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceT.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern ICET_EXPORT IceTBoolean icetRadixkPartitionLookupUnitTest(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern ICET_EXPORT IceTBoolean icetRadixTelescopeSendReceiveTest(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern ICET_EXPORT IceTBoolean icetRadixkTelescopeSendReceiveTest(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static int RadixkUnitTestsRun(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -31,7 +31,7 @@ static int RadixkUnitTestsRun(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return TEST_FAILED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (!icetRadixTelescopeSendReceiveTest()) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!icetRadixkTelescopeSendReceiveTest()) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return TEST_FAILED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/RadixkrUnitTests.c tests/RadixkrUnitTests.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+new file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0000000..99a70a6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/RadixkrUnitTests.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,42 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* -*- c -*- *****************************************************************
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** Copyright (C) 2011 Sandia Corporation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** the U.S. Government retains certain rights in this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++**
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++**
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** This exercises the radix-k unit tests of internal functions.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++*****************************************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceT.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern ICET_EXPORT IceTBoolean icetRadixkrPartitionLookupUnitTest(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int RadixkUnitTestsRun(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rank != 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return TEST_PASSED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!icetRadixkrPartitionLookupUnitTest()) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return TEST_FAILED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return TEST_PASSED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int RadixkrUnitTests(int argc, char *argv[])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* To remove warning. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (void)argc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (void)argv;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return run_test(RadixkUnitTestsRun);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/RandomTransform.c tests/RandomTransform.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index b2849a0..30c831c 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/RandomTransform.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/RandomTransform.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -14,7 +14,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevState.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevImage.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdio.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -274,34 +274,16 @@ static void check_results(int result)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void RandomTransformDoRender(IceTBoolean transparent,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTSizeType local_width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTSizeType local_height)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void check_image(IceTImage image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean transparent,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType local_width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType local_height)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTImage image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int result = TEST_PASSED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printstat("Rendering frame.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (transparent) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glColor4f(0.5f*g_color[0], 0.5f*g_color[1], 0.5f*g_color[2], 0.5f);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glColor4f(g_color[0], g_color[1], g_color[2], 1.0f);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glMatrixMode(GL_PROJECTION);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glLoadIdentity();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glOrtho(-1.0f,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- (GLfloat)((2.0*local_width*g_tile_dim)/SCREEN_WIDTH-1.0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- -1.0f,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- (GLfloat)((2.0*local_height*g_tile_dim)/SCREEN_HEIGHT-1.0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- -1.0f, 1.0f);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glMatrixMode(GL_MODELVIEW);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glLoadMatrixf(g_modelview);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- image = icetGLDrawFrame();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- swap_buffers();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (rank < g_tile_dim*g_tile_dim) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (transparent) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!compare_color_buffers(local_width, local_height,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -328,6 +310,121 @@ static void RandomTransformDoRender(IceTBoolean transparent,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ check_results(result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void RandomTransformDoRender(IceTBoolean transparent,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType local_width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType local_height)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTImage image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (transparent) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glColor4f(0.5f*g_color[0], 0.5f*g_color[1], 0.5f*g_color[2], 0.5f);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glColor4f(g_color[0], g_color[1], g_color[2], 1.0f);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glMatrixMode(GL_PROJECTION);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glLoadIdentity();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glOrtho(-1.0f,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (GLfloat)((2.0*local_width*g_tile_dim)/SCREEN_WIDTH-1.0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ -1.0f,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (GLfloat)((2.0*local_height*g_tile_dim)/SCREEN_HEIGHT-1.0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ -1.0f, 1.0f);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glMatrixMode(GL_MODELVIEW);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glLoadMatrixf(g_modelview);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat("Prerendering frame for composite.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTFloat background_color[4];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTVoid *color_buffer = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTVoid *depth_buffer = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum color_format;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum depth_format;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble projection_matrix[16];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble modelview_matrix[16];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt physical_viewport[4];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt global_viewport[4];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* When using draw to render the image directly, we have to change */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* a few OpenGL state variables and then restore them. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glGetFloatv(GL_COLOR_CLEAR_VALUE, background_color);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (transparent) { glClearColor(0.0, 0.0, 0.0, 0.0); }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glGetIntegerv(GL_VIEWPORT, physical_viewport);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_GLOBAL_VIEWPORT, global_viewport);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ width = global_viewport[2]; height = global_viewport[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glViewport(0, 0, width, height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ draw();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glViewport(physical_viewport[0], physical_viewport[1],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ physical_viewport[2], physical_viewport[3]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glClearColor(background_color[0], background_color[1],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ background_color[2], background_color[3]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glReadBuffer(GL_BACK);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glPixelStorei(GL_PACK_ROW_LENGTH, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetEnumv(ICET_COLOR_FORMAT, &color_format);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ switch (color_format) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_IMAGE_COLOR_RGBA_UBYTE:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color_buffer = malloc(width*height*4*sizeof(IceTUByte));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glReadPixels(0, 0,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ width, height,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ GL_RGBA,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ GL_UNSIGNED_BYTE,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color_buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_IMAGE_COLOR_RGBA_FLOAT:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color_buffer = malloc(width*height*4*sizeof(IceTFloat));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glReadPixels(0, 0,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ width, height,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ GL_RGBA,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ GL_FLOAT,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color_buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_IMAGE_COLOR_NONE:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Do nothing. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("********* Invalid color format 0x%x!\n", color_format);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ finalize_test(TEST_FAILED);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ exit(TEST_FAILED);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetEnumv(ICET_DEPTH_FORMAT, &depth_format);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ switch (depth_format) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_IMAGE_DEPTH_FLOAT:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ depth_buffer = malloc(width*height*sizeof(IceTFloat));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glReadPixels(0, 0,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ width, height,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ GL_DEPTH_COMPONENT,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ GL_FLOAT,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ depth_buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_IMAGE_DEPTH_NONE:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Do nothing. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("********* Invalid depth format 0x%x!\n", depth_format);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ finalize_test(TEST_FAILED);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ exit(TEST_FAILED);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glGetDoublev(GL_PROJECTION_MATRIX, projection_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glGetDoublev(GL_MODELVIEW_MATRIX, modelview_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image = icetCompositeImage(color_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ depth_buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NULL,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ modelview_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ background_color);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (color_buffer) { free(color_buffer); }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (depth_buffer) { free(depth_buffer); }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ check_image(image, transparent, local_width, local_height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat("Rendering frame with callbacks.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image = icetGLDrawFrame();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ swap_buffers();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ check_image(image, transparent, local_width, local_height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static void RandomTransformTryInterlace(IceTBoolean transparent,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType local_width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTSizeType local_height)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/RenderEmpty.c tests/RenderEmpty.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+new file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0000000..87688f9
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/RenderEmpty.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,244 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* -*- c -*- *****************************************************************
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** Copyright (C) 2013 Sandia Corporation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** the U.S. Government retains certain rights in this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++**
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++**
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** This tests the ICET_RENDER_EMPTY_IMAGES option. It makes sure that the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** render callback is invoked even if the option is on and not if the option
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++** is off.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++*****************************************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceT.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceTDevMatrix.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdio.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <string.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static const IceTFloat g_background_color[4] = { 0.5, 0.5, 0.5, 1.0 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static const IceTFloat g_foreground_color[4] = { 0.0, 0.25, 0.5, 1.0 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IceTBoolean g_render_callback_invoked;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IceTBoolean g_render_callback_parameters_correct;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTBoolean ColorsEqual(const IceTFloat *color1, const IceTFloat *color2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = (color1[0] == color2[0]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result &= (color1[1] == color2[1]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result &= (color1[2] == color2[2]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result &= (color1[3] == color2[3]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void RenderEmptyDraw(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTDouble *modelview_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTFloat *background_color,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTInt *readback_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTImage result)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTFloat *colors;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Report that the callback was invoked. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_render_callback_invoked = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ width = icetImageGetWidth(result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ height = icetImageGetHeight(result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ colors = icetImageGetColorf(result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Set all pixels to something invalid. IceT should be ignoring them. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType pixel;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (pixel = 0; pixel < width*height; pixel++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ colors[4*pixel + 0] = g_foreground_color[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ colors[4*pixel + 1] = g_foreground_color[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ colors[4*pixel + 2] = g_foreground_color[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ colors[4*pixel + 3] = g_foreground_color[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_render_callback_parameters_correct = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Check to make sure that readback_viewport is actually empty. If it is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * not, we can expect an error later when we check the image, but put a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * warning here to help diagnose where the problem is. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((readback_viewport[2] != 0) || (readback_viewport[3] != 0)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("Got a readback_viewport with a positive dimension: %dx%d\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ readback_viewport[2], readback_viewport[3]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_render_callback_parameters_correct = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Even though IceT should ignore anything in the render, it should still
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * pass valid rendering parameters. Check them now. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ( (background_color[0] != 0.0f)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ || (background_color[1] != 0.0f)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ || (background_color[2] != 0.0f)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ || (background_color[3] != 0.0f)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("Got a bad background color %f %f %f %f.\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ background_color[0],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ background_color[1],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ background_color[2],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ background_color[3]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_render_callback_parameters_correct = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int column_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (column_index = 0; column_index < 4; column_index++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int row_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (row_index = 0; row_index < 4; row_index++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble projection_value =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_MATRIX(projection_matrix, row_index, column_index);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble modelview_value =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_MATRIX(modelview_matrix, row_index, column_index);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble expected_value =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (row_index == column_index) ? 1.0 : 0.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (projection_value != expected_value) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("Got bad projection matrix, "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "row=%d, column=%d, value=%lf\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ row_index, column_index, projection_value);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (modelview_value != expected_value) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("Got bad modelview matrix, "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "row=%d, column=%d, value=%lf\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ row_index, column_index, modelview_value);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void RenderEmptySetupRender()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCompositeMode(ICET_COMPOSITE_MODE_BLEND);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSetColorFormat(ICET_IMAGE_COLOR_RGBA_FLOAT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSetDepthFormat(ICET_IMAGE_DEPTH_NONE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetDisable(ICET_ORDERED_COMPOSITE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetEnable(ICET_CORRECT_COLORED_BACKGROUND);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Sequential rendering means that the compositor will not try to skip
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * empty tiles. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetStrategy(ICET_STRATEGY_SEQUENTIAL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetDrawCallback(RenderEmptyDraw);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetResetTiles();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetAddTile(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void RenderEmptyGetMatrices(IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble *modelview_matrix)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Don't really care about the matricies. Just use identities. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetMatrixIdentity(projection_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetMatrixIdentity(modelview_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Declare the geometry well outside the view. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetBoundingBoxd(1000.0, 2000.0, 1000.0, 2000.0, 1000.0, 2000.0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int RenderEmptyCheckImage(const IceTImage image)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rank == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTFloat *buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType x, y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ buffer = icetImageGetColorcf(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (y = 0; y < SCREEN_HEIGHT; y++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (x = 0; x < SCREEN_WIDTH; x++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTFloat *pixel = buffer + 4*(y*SCREEN_WIDTH + x);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!ColorsEqual(pixel, g_background_color)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("**** Found bad pixel!!!! ****\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("Region location x = %d, y = %d\n", x, y);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("Got color %f %f %f %f\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pixel[0], pixel[1], pixel[2], pixel[3]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("Expected %f %f %f %f\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_background_color[0],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_background_color[1],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_background_color[2],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_background_color[3]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return TEST_FAILED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return TEST_PASSED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int RenderEmptyTryRender()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble projection_matrix[16];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble modelview_matrix[16];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTImage image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RenderEmptySetupRender();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RenderEmptyGetMatrices(projection_matrix, modelview_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image = icetDrawFrame(projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ modelview_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_background_color);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return RenderEmptyCheckImage(image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int RenderEmptyTryOptions()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int result = TEST_PASSED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat("ICET_RENDER_EMPTY_IMAGES disabled. "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "Should NOT be in draw callback.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetDisable(ICET_RENDER_EMPTY_IMAGES);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_render_callback_invoked = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_render_callback_parameters_correct = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result += RenderEmptyTryRender();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (g_render_callback_invoked) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("**** The draw callback was called ****\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = TEST_FAILED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Second call, empty renders should be called. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat("ICET_RENDER_EMPTY_IMAGES enabled. "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "Draw callback should be invoked everywhere.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetEnable(ICET_RENDER_EMPTY_IMAGES);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_render_callback_invoked = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_render_callback_parameters_correct = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result += RenderEmptyTryRender();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!g_render_callback_invoked) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("**** The draw callback was not called ****\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = TEST_FAILED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!g_render_callback_parameters_correct) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("**** Matricies were wrong in callback ****\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = TEST_FAILED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int RenderEmptyRun(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return RenderEmptyTryOptions();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int RenderEmpty(int argc, char *argv[])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* To remove warning. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (void)argc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (void)argv;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return run_test(RenderEmptyRun);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/SimpleExample.c tests/SimpleExample.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 688c710..36f1969 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/SimpleExample.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/SimpleExample.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,32 +10,83 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *****************************************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTGL.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# include <OpenGL/gl.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# include <OpenGL/glu.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# include <GL/gl.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# include <GL/glu.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdio.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <math.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef M_PI
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define M_PI 3.14159265358979323846264338327950288 /* pi */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define SPHERE_RESOLUTION 20
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define SPHERE_RADIUS 0.5f
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define SPHERE_NUM_QUADS (SPHERE_RESOLUTION*SPHERE_RESOLUTION/2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define SPHERE_NUM_VERTICES (SPHERE_NUM_QUADS*4)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void GetSphereArrays(GLfloat **vertex_array_p, GLfloat **normal_array_p)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ static GLfloat vertex_array[SPHERE_NUM_VERTICES*3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ static GLfloat normal_array[SPHERE_NUM_VERTICES*3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ static GLboolean arrays_initialized = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!arrays_initialized)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ GLfloat cos_table[SPHERE_RESOLUTION+1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ GLfloat sin_table[SPHERE_RESOLUTION+1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int theta_index, phi_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // Fill out tables.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (theta_index = 0; theta_index <= SPHERE_RESOLUTION; theta_index++)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cos_table[theta_index]=cosf((2*M_PI/SPHERE_RESOLUTION)*theta_index);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sin_table[theta_index]=sinf((2*M_PI/SPHERE_RESOLUTION)*theta_index);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // Compute the vertices and normals.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ GLfloat *vertex_p = vertex_array;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ GLfloat *normal_p = normal_array;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (phi_index = 0; phi_index < SPHERE_RESOLUTION/2; phi_index++)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (theta_index = 0; theta_index<SPHERE_RESOLUTION; theta_index++)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define SET_VERT(t_index, p_index) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ normal_p[0] = cos_table[t_index]*sin_table[p_index]; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ normal_p[1] = sin_table[t_index]*sin_table[p_index]; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ normal_p[2] = cos_table[p_index]; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ vertex_p[0] = normal_p[0]*SPHERE_RADIUS; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ vertex_p[1] = normal_p[1]*SPHERE_RADIUS; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ vertex_p[2] = normal_p[2]*SPHERE_RADIUS; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ normal_p += 3; vertex_p += 3;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SET_VERT(theta_index, phi_index);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SET_VERT(theta_index, phi_index+1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SET_VERT(theta_index+1, phi_index+1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SET_VERT(theta_index+1, phi_index);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ arrays_initialized = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *vertex_array_p = vertex_array;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *normal_array_p = normal_array;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static void draw(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- static GLUquadricObj *sphere = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ GLfloat *vertex_array;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ GLfloat *normal_array;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (sphere == NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sphere = gluNewQuadric();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gluQuadricDrawStyle(sphere, GLU_FILL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gluQuadricNormals(sphere, GLU_SMOOTH);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ GetSphereArrays(&vertex_array, &normal_array);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glVertexPointer(3, GL_FLOAT, 0, vertex_array);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glNormalPointer(GL_FLOAT, 0, vertex_array);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glEnableClientState(GL_VERTEX_ARRAY);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glEnableClientState(GL_NORMAL_ARRAY);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -50,7 +101,7 @@ static void draw(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ glPushMatrix();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ glMatrixMode(GL_MODELVIEW);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ glTranslatef((float)rank, 0, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gluSphere(sphere, 0.5, 10, 30);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glDrawArrays(GL_QUADS, 0, SPHERE_NUM_VERTICES);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ glPopMatrix();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -60,8 +111,8 @@ static int SimpleExampleRun()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Normally, the first thing that you do is set up your communication and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * then create at least one IceT context. This has already been done in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * the calling function (i.e. icetTests_mpi.c). See the init_mpi_comm in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * mpi_comm.h for an example.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * the calling function (i.e. icetTests_mpi.c). See the init_mpi in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * test_mpi.h for an example.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* If we had set up the communication layer ourselves, we could have
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/SimpleTiming.c tests/SimpleTiming.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0d2f85f..ddd9613 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/SimpleTiming.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/SimpleTiming.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -11,8 +11,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevCommunication.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevContext.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceTDevImage.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevMatrix.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -36,19 +37,38 @@ struct region_divide_struct {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ typedef struct region_divide_struct *region_divide;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define NAME_SIZE 32
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ typedef struct {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ char strategy_name[NAME_SIZE];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ char si_strategy_name[NAME_SIZE];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt num_tiles_x;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt num_tiles_y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt screen_width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt screen_height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTFloat zoom;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean transparent;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean no_interlace;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean no_collect;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean dense_images;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt max_image_split;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt frame_number;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble render_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble buffer_read_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble buffer_write_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble compress_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble interlace_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble blend_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble draw_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble composite_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble collect_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTInt bytes_sent;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt64 bytes_sent;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble frame_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } timings_type;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static timings_type *g_timing_log;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTSizeType g_timing_log_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Array for quick opacity lookups. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define OPACITY_LOOKUP_SIZE 4096
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define OPACITY_MAX_DT 4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -80,10 +100,13 @@ static IceTInt g_num_tiles_x;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTInt g_num_tiles_y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTInt g_num_frames;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTInt g_seed;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTFloat g_zoom;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTBoolean g_transparent;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTBoolean g_colored_background;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTBoolean g_no_interlace;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTBoolean g_no_collect;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTBoolean g_use_callback;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTBoolean g_dense_images;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTBoolean g_sync_render;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTBoolean g_write_image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTEnum g_strategy;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -92,6 +115,9 @@ static IceTBoolean g_do_magic_k_study;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTInt g_max_magic_k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTBoolean g_do_image_split_study;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static IceTInt g_min_image_split;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTBoolean g_do_scaling_study_factor_2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTBoolean g_do_scaling_study_factor_2_3;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTInt g_num_scaling_study_random;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static float g_color[4];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -101,25 +127,40 @@ static void usage(char *argv[])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat("\nWhere testargs are:\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat(" -tilesx <num> Sets the number of tiles horizontal (default 1).\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat(" -tilesy <num> Sets the number of tiles vertical (default 1).\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printstat(" -frames Sets the number of frames to render (default 2).\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat(" -frames <num> Sets the number of frames to render (default 2).\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat(" -seed <num> Use the given number as the random seed.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat(" -zoom <num> Set the zoom factor for the camera (larger = more zoom).\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat(" -transparent Render transparent images. (Uses 4 floats for colors.)\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat(" -colored-background Use a color for the background and correct as necessary.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat(" -no-interlace Turn off the image interlacing optimization.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat(" -no-collect Turn off image collection.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat(" -use-callback Do the drawing in an IceT callback.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat(" -sync-render Synchronize rendering by adding a barrier to the draw callback.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat(" -dense-images Composite dense images by classifying no pixels as background.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat(" -write-image Write an image on the first frame.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat(" -reduce Use the reduce strategy (default).\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat(" -vtree Use the virtual trees strategy.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat(" -sequential Use the sequential strategy.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat(" -bswap Use the binary-swap single-image strategy.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat(" -bswapfold Use the binary-swap with folding single-image strategy.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat(" -radixk Use the radix-k single-image strategy.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat(" -radixkr Use the radix-kr single-image strategy.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat(" -tree Use the tree single-image strategy.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat(" -magic-k-study <num> Use the radix-k single-image strategy and repeat for\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- " multiple values of k, up to <num>, doubling each time.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ " multiple values of k, up to <num>, doubling each time.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat(" -max-image-split-study <num> Repeat the test for multiple maximum image\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- " splits starting at <num> and doubling each time.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printstat(" -h, -help Print this help message.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ " splits starting at <num> and doubling each time.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat(" -scaling-study-factor-2 Perform a scaling study for all process counts\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ " that are a factor of 2.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat(" -scaling-study-factor-2-3 Perform a scaling study that includes all\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ " process counts that are a factor of 2 plus all process\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ " counts that are a factor of 3 plus most process counts\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ " that have factors of 2 and 3.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat(" -scaling-study-random <num> Picks a random number to bifurcate the\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ " processes and runs the compositing on each of them. This\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ " experiment is run <num> times. Run enough times this test\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ " should give performance over scales at odd process counts.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printstat(" -h, -help Print this help message.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printstat("\nFor general testing options, try -h or -help before test name.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -131,11 +172,14 @@ static void parse_arguments(int argc, char *argv[])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_num_tiles_y = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_num_frames = 2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_seed = (IceTInt)time(NULL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_zoom = (IceTFloat)1.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_transparent = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_colored_background = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- g_sync_render = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_no_interlace = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_no_collect = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_use_callback = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_dense_images = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_sync_render = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_write_image = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_strategy = ICET_STRATEGY_REDUCE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_single_image_strategy = ICET_SINGLE_IMAGE_STRATEGY_AUTOMATIC;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -143,6 +187,9 @@ static void parse_arguments(int argc, char *argv[])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_max_magic_k = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_do_image_split_study = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_min_image_split = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_do_scaling_study_factor_2 = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_do_scaling_study_factor_2_3 = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_num_scaling_study_random = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (arg = 1; arg < argc; arg++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (strcmp(argv[arg], "-tilesx") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -157,6 +204,9 @@ static void parse_arguments(int argc, char *argv[])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (strcmp(argv[arg], "-seed") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ arg++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_seed = atoi(argv[arg]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if (strcmp(argv[arg], "-zoom") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ arg++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_zoom = (IceTFloat)atof(argv[arg]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (strcmp(argv[arg], "-transparent") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_transparent = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (strcmp(argv[arg], "-colored-background") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -165,6 +215,12 @@ static void parse_arguments(int argc, char *argv[])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_no_interlace = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (strcmp(argv[arg], "-no-collect") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_no_collect = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if (strcmp(argv[arg], "-use-callback") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_use_callback = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if (strcmp(argv[arg], "-dense-images") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_dense_images = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Turn of interlacing. It won't help here. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_no_interlace = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (strcmp(argv[arg], "-sync-render") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_sync_render = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (strcmp(argv[arg], "-write-image") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -177,20 +233,31 @@ static void parse_arguments(int argc, char *argv[])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_strategy = ICET_STRATEGY_SEQUENTIAL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (strcmp(argv[arg], "-bswap") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_single_image_strategy = ICET_SINGLE_IMAGE_STRATEGY_BSWAP;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if (strcmp(argv[arg], "-bswapfold") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_single_image_strategy = ICET_SINGLE_IMAGE_STRATEGY_BSWAP_FOLDING;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (strcmp(argv[arg], "-radixk") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_single_image_strategy = ICET_SINGLE_IMAGE_STRATEGY_RADIXK;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if (strcmp(argv[arg], "-radixkr") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_single_image_strategy = ICET_SINGLE_IMAGE_STRATEGY_RADIXKR;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (strcmp(argv[arg], "-tree") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_single_image_strategy = ICET_SINGLE_IMAGE_STRATEGY_TREE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (strcmp(argv[arg], "-magic-k-study") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_do_magic_k_study = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- g_single_image_strategy = ICET_SINGLE_IMAGE_STRATEGY_RADIXK;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_single_image_strategy = ICET_SINGLE_IMAGE_STRATEGY_RADIXKR;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ arg++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_max_magic_k = atoi(argv[arg]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (strcmp(argv[arg], "-max-image-split-study") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_do_image_split_study = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- g_single_image_strategy = ICET_SINGLE_IMAGE_STRATEGY_RADIXK;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_single_image_strategy = ICET_SINGLE_IMAGE_STRATEGY_RADIXKR;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ arg++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ g_min_image_split = atoi(argv[arg]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if (strcmp(argv[arg], "-scaling-study-factor-2") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_do_scaling_study_factor_2 = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if (strcmp(argv[arg], "-scaling-study-factor-2-3") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_do_scaling_study_factor_2_3 = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if (strcmp(argv[arg], "-scaling-study-random") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ arg++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_num_scaling_study_random = atoi(argv[arg]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if ( (strcmp(argv[arg], "-h") == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || (strcmp(argv[arg], "-help")) ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ usage(argv);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -302,8 +369,8 @@ static void draw(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTBoolean success;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int planeIdx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ struct hexahedron transformed_box;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTInt screen_width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTInt screen_height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTFloat *colors_float = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTUByte *colors_byte = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTFloat *depths = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -311,11 +378,14 @@ static void draw(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt pixel_y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble ray_origin[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble ray_direction[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTFloat background_depth;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTFloat background_alpha;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetMatrixMultiply(transform, projection_matrix, modelview_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ success = icetMatrixInverseTranspose((const IceTDouble *)transform,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ inverse_transpose_transform);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!success) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printrank("ERROR: Inverse failed.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -329,8 +399,8 @@ static void draw(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ original_plane);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetGetIntegerv(ICET_PHYSICAL_RENDER_WIDTH, &screen_width);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetGetIntegerv(ICET_PHYSICAL_RENDER_HEIGHT, &screen_height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ width = icetImageGetWidth(result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ height = icetImageGetHeight(result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (g_transparent) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ colors_float = icetImageGetColorf(result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -339,13 +409,46 @@ static void draw(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depths = icetImageGetDepthf(result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!g_dense_images) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ background_depth = 1.0f;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ background_alpha = background_color[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType pixel_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* To fake dense images, use a depth and alpha for the background that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * IceT will not recognize as background. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ background_depth = 0.999f;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ background_alpha
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ = (background_color[3] == 0) ? 0.001 : background_color[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Clear out the the images to background so that pixels outside of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * the contained viewport have valid values. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (pixel_index = 0; pixel_index < width*height; pixel_index++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (g_transparent) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTFloat *color_dest = colors_float + 4*pixel_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color_dest[0] = background_color[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color_dest[1] = background_color[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color_dest[2] = background_color[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color_dest[3] = background_alpha;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTUByte *color_dest = colors_byte + 4*pixel_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTFloat *depth_dest = depths + pixel_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color_dest[0] = (IceTUByte)(background_color[0]*255);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color_dest[1] = (IceTUByte)(background_color[1]*255);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color_dest[2] = (IceTUByte)(background_color[2]*255);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color_dest[3] = (IceTUByte)(background_alpha*255);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ depth_dest[0] = background_depth;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ray_direction[0] = ray_direction[1] = 0.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ray_direction[2] = 1.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ray_origin[2] = -1.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (pixel_y = readback_viewport[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pixel_y < readback_viewport[1] + readback_viewport[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pixel_y++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ray_origin[1] = (2.0*pixel_y)/screen_height - 1.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ray_origin[1] = (2.0*pixel_y)/height - 1.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (pixel_x = readback_viewport[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pixel_x < readback_viewport[0] + readback_viewport[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pixel_x++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -356,7 +459,7 @@ static void draw(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTFloat color[4];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTFloat depth;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ray_origin[0] = (2.0*pixel_x)/screen_width - 1.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ray_origin[0] = (2.0*pixel_x)/width - 1.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ intersect_ray_hexahedron(ray_origin,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ray_direction,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -382,6 +485,7 @@ static void draw(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Modify color by an opacity determined by thickness. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble thickness = far_distance - near_distance;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble opacity = QUICK_OPACITY(4.0*thickness);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (opacity < 0.001) { opacity = 0.001; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ color[0] *= (IceTFloat)opacity;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ color[1] *= (IceTFloat)opacity;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ color[2] *= (IceTFloat)opacity;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -391,22 +495,22 @@ static void draw(const IceTDouble *projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ color[0] = background_color[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ color[1] = background_color[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ color[2] = background_color[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- color[3] = background_color[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- depth = 1.0f;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ color[3] = background_alpha;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ depth = background_depth;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (g_transparent) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTFloat *color_dest
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- = colors_float + 4*(pixel_y*screen_width + pixel_x);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ = colors_float + 4*(pixel_y*width + pixel_x);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ color_dest[0] = color[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ color_dest[1] = color[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ color_dest[2] = color[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ color_dest[3] = color[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTUByte *color_dest
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- = colors_byte + 4*(pixel_y*screen_width + pixel_x);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ = colors_byte + 4*(pixel_y*width + pixel_x);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTFloat *depth_dest
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- = depths + pixel_y*screen_width + pixel_x;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ = depths + pixel_y*width + pixel_x;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ color_dest[0] = (IceTUByte)(color[0]*255);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ color_dest[1] = (IceTUByte)(color[1]*255);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ color_dest[2] = (IceTUByte)(color[2]*255);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -593,10 +697,264 @@ static void find_composite_order(const IceTDouble *projection,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ free(process_ranks);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Finds the viewport of the bounds of the locally rendered geometry. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* This code is stolen from drawFindContainedViewport in draw.c. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void find_contained_viewport(IceTInt contained_viewport[4],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTDouble projection_matrix[16],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTDouble modelview_matrix[16])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble total_transform[16];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble left, right, bottom, top;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble *transformed_verts;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt global_viewport[4];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt num_bounding_verts;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int i;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_GLOBAL_VIEWPORT, global_viewport);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble viewport_matrix[16];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble tmp_matrix[16];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Strange projection matrix that transforms the x and y of normalized
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ screen coordinates into viewport coordinates that may be cast to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ integers. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ viewport_matrix[ 0] = global_viewport[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ viewport_matrix[ 1] = 0.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ viewport_matrix[ 2] = 0.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ viewport_matrix[ 3] = 0.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ viewport_matrix[ 4] = 0.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ viewport_matrix[ 5] = global_viewport[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ viewport_matrix[ 6] = 0.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ viewport_matrix[ 7] = 0.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ viewport_matrix[ 8] = 0.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ viewport_matrix[ 9] = 0.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ viewport_matrix[10] = 2.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ viewport_matrix[11] = 0.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ viewport_matrix[12] = global_viewport[2] + global_viewport[0]*2.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ viewport_matrix[13] = global_viewport[3] + global_viewport[1]*2.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ viewport_matrix[14] = 0.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ viewport_matrix[15] = 2.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetMatrixMultiply(tmp_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (const IceTDouble *)projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (const IceTDouble *)modelview_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetMatrixMultiply(total_transform,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (const IceTDouble *)viewport_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (const IceTDouble *)tmp_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_NUM_BOUNDING_VERTS, &num_bounding_verts);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ transformed_verts = icetGetStateBuffer(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_TRANSFORMED_BOUNDS,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sizeof(IceTDouble)*num_bounding_verts*4);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Transform each vertex to find where it lies in the global viewport and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ normalized z. Leave the results in homogeneous coordinates for now. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTDouble *bound_vert
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ = icetUnsafeStateGetDouble(ICET_GEOMETRY_BOUNDS);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (i = 0; i < num_bounding_verts; i++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble bound_vert_4vec[4];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ bound_vert_4vec[0] = bound_vert[3*i+0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ bound_vert_4vec[1] = bound_vert[3*i+1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ bound_vert_4vec[2] = bound_vert[3*i+2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ bound_vert_4vec[3] = 1.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetMatrixVectorMultiply(transformed_verts + 4*i,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (const IceTDouble *)total_transform,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (const IceTDouble *)bound_vert_4vec);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Set absolute mins and maxes. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ left = global_viewport[0] + global_viewport[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ right = global_viewport[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ bottom = global_viewport[1] + global_viewport[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ top = global_viewport[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Now iterate over all the transformed verts and adjust the absolute mins
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ and maxs to include them all. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (i = 0; i < num_bounding_verts; i++)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble *vert = transformed_verts + 4*i;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Check to see if the vertex is in front of the near cut plane. This
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ is true when z/w >= -1 or z + w >= 0. The second form is better just
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ in case w is 0. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (vert[2] + vert[3] >= 0.0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Normalize homogeneous coordinates. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble invw = 1.0/vert[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble x = vert[0]*invw;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble y = vert[1]*invw;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Update contained region. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (left > x) left = x;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (right < x) right = x;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (bottom > y) bottom = y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (top < y) top = y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* The vertex is being clipped by the near plane. In perspective
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mode, vertices behind the near clipping plane can sometimes give
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ misleading projections. Instead, find all the other vertices on
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ the other side of the near plane, compute the intersection of the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ segment between the two points and the near plane (in homogeneous
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ coordinates) and use that as the projection. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int j;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (j = 0; j < num_bounding_verts; j++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble *vert2 = transformed_verts + 4*j;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ double t;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTDouble x, y, invw;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (vert2[2] + vert2[3] < 0.0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Ignore other points behind near plane. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ continue;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Let the two points in question be v_i and v_j. Define the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ segment between them with the parametric equation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p(t) = (vert - vert2)t + vert2. First, find t where the z and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ w coordinates of p(t) sum to zero. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ t = (vert2[2]+vert2[3])/(vert2[2]-vert[2] + vert2[3]-vert[3]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Use t to find the intersection point. While we are at it,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ normalize the resulting coordinates. We don't need z because
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ we know it is going to be -1. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ invw = 1.0/((vert[3] - vert2[3])*t + vert2[3] );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ x = ((vert[0] - vert2[0])*t + vert2[0] ) * invw;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ y = ((vert[1] - vert2[1])*t + vert2[1] ) * invw;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Update contained region. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (left > x) left = x;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (right < x) right = x;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (bottom > y) bottom = y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (top < y) top = y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ left = floor(left);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ right = ceil(right);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ bottom = floor(bottom);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ top = ceil(top);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Clip bounds to global viewport. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (left < global_viewport[0]) left = global_viewport[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (right > global_viewport[0] + global_viewport[2])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ right = global_viewport[0] + global_viewport[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (bottom < global_viewport[1]) bottom = global_viewport[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (top > global_viewport[1] + global_viewport[3])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ top = global_viewport[1] + global_viewport[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Use this information to build a containing viewport. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ contained_viewport[0] = (IceTInt)left;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ contained_viewport[1] = (IceTInt)bottom;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ contained_viewport[2] = (IceTInt)(right - left);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ contained_viewport[3] = (IceTInt)(top - bottom);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void SimpleTimingCollectAndPrintLog()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *log_sizes;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_NUM_PROCESSES, &num_proc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Collect the number of log entries each process has. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ log_sizes = malloc(num_proc*sizeof(IceTInt));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCommGather(&g_timing_log_size, 1, ICET_SIZE_TYPE, log_sizes, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rank == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timings_type *all_logs;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType *data_sizes;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTSizeType *offsets;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt total_logs;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt proc_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt log_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ data_sizes = malloc(num_proc*sizeof(IceTSizeType));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ offsets = malloc(num_proc*sizeof(IceTSizeType));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ total_logs = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (proc_index = 0; proc_index < num_proc; proc_index++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ data_sizes[proc_index] = log_sizes[proc_index]*sizeof(timings_type);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ offsets[proc_index] = total_logs*sizeof(timings_type);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ total_logs += log_sizes[proc_index];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ all_logs = malloc(total_logs*sizeof(timings_type));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCommGatherv(g_timing_log,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_timing_log_size*sizeof(timings_type),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_BYTE,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ all_logs,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ data_sizes,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ offsets,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (log_index = 0; log_index < total_logs; log_index++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timings_type *timing = all_logs + log_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("LOG,%d,%s,%s,%d,%d,%d,%d,%0.1f,%s,%s,%s,%s,%d,%d,%lg,%lg,%lg,%lg,%lg,%lg,%lg,%lg,%lg,%ld,%lg\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->num_proc,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->strategy_name,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->si_strategy_name,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->num_tiles_x,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->num_tiles_y,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->screen_width,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->screen_height,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->zoom,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->transparent ? "yes" : "no",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->no_interlace ? "no" : "yes",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->no_collect ? "no" : "yes",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->dense_images ? "yes" : "no",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->max_image_split,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->frame_number,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->render_time,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->buffer_read_time,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->buffer_write_time,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->compress_time,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->interlace_time,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->blend_time,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->draw_time,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->composite_time,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->collect_time,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (long int)timing->bytes_sent,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->frame_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ free(data_sizes);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ free(offsets);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ free(all_logs);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else /* rank != 0 */ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCommGatherv(g_timing_log,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_timing_log_size*sizeof(timings_type),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ICET_BYTE,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NULL,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NULL,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NULL,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ free(log_sizes);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (g_timing_log_size > 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ free(g_timing_log);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_timing_log = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_timing_log_size = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* This is to prevent a non-root from printing while the root is writing
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ the log. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCommBarrier();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static int SimpleTimingDoRender()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const char *strategy_name;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const char *si_strategy_name;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt max_image_split;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ float aspect = ( (float)(g_num_tiles_x*SCREEN_WIDTH)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ / (float)(g_num_tiles_y*SCREEN_HEIGHT) );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -608,12 +966,15 @@ static int SimpleTimingDoRender()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble projection_matrix[16];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTFloat background_color[4];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTImage pre_rendered_image = icetImageNull();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void *pre_rendered_image_buffer = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ timings_type *timing_array;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Normally, the first thing that you do is set up your communication and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * then create at least one IceT context. This has already been done in the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * calling function (i.e. icetTests_mpi.c). See the init_mpi_comm in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * mpi_comm.h for an example.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * calling function (i.e. icetTests_mpi.c). See the init_mpi in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * test_mpi.h for an example.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ init_opacity_lookup();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -663,9 +1024,9 @@ static int SimpleTimingDoRender()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetEnable(ICET_COLLECT_IMAGES);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Give IceT the bounds of the polygons that will be drawn. Note that IceT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * will take care of any transformation that gets passed to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * icetDrawFrame. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Give IceT the bounds of the polygons that will be drawn. Note that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * IceT will take care of any transformation that gets passed to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * icetDrawFrame. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetBoundingBoxd(-0.5f, 0.5f, -0.5, 0.5, -0.5, 0.5);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Determine the region we want the local geometry to be in. This will be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -695,11 +1056,27 @@ static int SimpleTimingDoRender()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return TEST_FAILED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!g_use_callback) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt global_viewport[4];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt width, height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt buffer_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_GLOBAL_VIEWPORT, global_viewport);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ width = global_viewport[2]; height = global_viewport[3];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ buffer_size = icetImageBufferSize(width, height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pre_rendered_image_buffer = malloc(buffer_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pre_rendered_image =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetImageAssignBuffer(pre_rendered_image_buffer, width, height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetStrategy(g_strategy);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetSingleImageStrategy(g_single_image_strategy);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Set up the projection matrix. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetMatrixFrustum(-0.65*aspect, 0.65*aspect, -0.65, 0.65, 3.0, 5.0,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetMatrixFrustum(-0.65*aspect/g_zoom, 0.65*aspect/g_zoom,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ -0.65/g_zoom, 0.65/g_zoom,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ 3.0, 5.0,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ projection_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (rank%10 < 7) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -729,16 +1106,32 @@ static int SimpleTimingDoRender()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ timing_array = malloc(g_num_frames * sizeof(timings_type));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ strategy_name = icetGetStrategyName();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (g_single_image_strategy == ICET_SINGLE_IMAGE_STRATEGY_RADIXK) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ static char name_buffer[256];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt magic_k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_MAGIC_K, &magic_k);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sprintf(name_buffer, "radix-k %d", (int)magic_k);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ si_strategy_name = name_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if (g_single_image_strategy == ICET_SINGLE_IMAGE_STRATEGY_RADIXKR) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ static char name_buffer[256];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt magic_k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_MAGIC_K, &magic_k);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sprintf(name_buffer, "radix-kr %d", (int)magic_k);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ si_strategy_name = name_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ si_strategy_name = icetGetSingleImageStrategyName();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_MAX_IMAGE_SPLIT, &max_image_split);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (frame = 0; frame < g_num_frames; frame++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble elapsed_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTDouble modelview_matrix[16];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTImage image;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Get everyone to start at the same time. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetCommBarrier();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- elapsed_time = icetWallTime();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* We can set up a modelview matrix here and IceT will factor this in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * determining the screen projection of the geometry. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetMatrixIdentity(modelview_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -774,20 +1167,79 @@ static int SimpleTimingDoRender()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bounds_max[2] - bounds_min[2]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetMatrixMultiplyTranslate(modelview_matrix, 0.5, 0.5, 0.5);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Instead of calling draw() directly, call it indirectly through
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * icetDrawFrame(). IceT will automatically handle image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * compositing. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- g_first_render = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- image = icetDrawFrame(projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- modelview_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- background_color);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!g_use_callback) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Draw the image for the frame. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt contained_viewport[4];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ find_contained_viewport(contained_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ modelview_matrix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (g_transparent) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTFloat black[4] = { 0.0, 0.0, 0.0, 0.0 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ draw(projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ modelview_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ black,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ contained_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pre_rendered_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ draw(projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ modelview_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ background_color,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ contained_viewport,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pre_rendered_image);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (g_dense_images) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* With dense images, we want IceT to load in all pixels, so clear
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * out the bounding box/vertices. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetBoundingVertices(0, ICET_VOID, 0, 0, NULL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Get everyone to start at the same time. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCommBarrier();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ elapsed_time = icetWallTime();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (g_use_callback) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Instead of calling draw() directly, call it indirectly through
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * icetDrawFrame(). IceT will automatically handle image
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * compositing. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_first_render = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image = icetDrawFrame(projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ modelview_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ background_color);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image = icetCompositeImage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetImageGetColorConstVoid(pre_rendered_image,NULL),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_transparent ? NULL : icetImageGetDepthConstVoid(pre_rendered_image,NULL),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NULL,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ projection_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ modelview_matrix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ background_color);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Let everyone catch up before finishing the frame. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetCommBarrier();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ elapsed_time = icetWallTime() - elapsed_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Print timings to logging. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Record timings to logging. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing_array[frame].num_proc = num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ strncpy(timing_array[frame].strategy_name, strategy_name, NAME_SIZE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing_array[frame].strategy_name[NAME_SIZE-1] = '\0';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ strncpy(timing_array[frame].si_strategy_name, si_strategy_name, NAME_SIZE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing_array[frame].si_strategy_name[NAME_SIZE-1] = '\0';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing_array[frame].num_tiles_x = g_num_tiles_x;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing_array[frame].num_tiles_y = g_num_tiles_y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing_array[frame].screen_width = SCREEN_WIDTH;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing_array[frame].screen_height = SCREEN_HEIGHT;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing_array[frame].zoom = g_zoom;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing_array[frame].transparent = g_transparent;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing_array[frame].no_interlace = g_no_interlace;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing_array[frame].no_collect = g_no_collect;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing_array[frame].dense_images = g_dense_images;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing_array[frame].max_image_split = max_image_split;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing_array[frame].frame_number = frame;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetDoublev(ICET_RENDER_TIME,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ &timing_array[frame].render_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetDoublev(ICET_BUFFER_READ_TIME,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -796,6 +1248,8 @@ static int SimpleTimingDoRender()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ &timing_array[frame].buffer_write_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetDoublev(ICET_COMPRESS_TIME,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ &timing_array[frame].compress_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetDoublev(ICET_INTERLACE_TIME,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ &timing_array[frame].interlace_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetDoublev(ICET_BLEND_TIME,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ &timing_array[frame].blend_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetDoublev(ICET_TOTAL_DRAW_TIME,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -804,8 +1258,8 @@ static int SimpleTimingDoRender()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ &timing_array[frame].composite_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetDoublev(ICET_COLLECT_TIME,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ &timing_array[frame].collect_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetGetIntegerv(ICET_BYTES_SENT,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- &timing_array[frame].bytes_sent);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing_array[frame].bytes_sent
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ = icetUnsafeStateGetInteger(ICET_BYTES_SENT)[0];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ timing_array[frame].frame_time = elapsed_time;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Write out image to verify rendering occurred correctly. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -822,27 +1276,20 @@ static int SimpleTimingDoRender()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Print logging header. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Collect max times and log. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ timings_type *timing_collection = malloc(num_proc*sizeof(timings_type));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const char *strategy_name;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const char *si_strategy_name;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTInt max_image_split;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- strategy_name = icetGetStrategyName();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (g_single_image_strategy == ICET_SINGLE_IMAGE_STRATEGY_RADIXK) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- static char name_buffer[256];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTInt magic_k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetGetIntegerv(ICET_MAGIC_K, &magic_k);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sprintf(name_buffer, "radix-k %d", (int)magic_k);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- si_strategy_name = name_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- si_strategy_name = icetGetSingleImageStrategyName();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rank == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (g_timing_log_size == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_timing_log = malloc(g_num_frames*sizeof(timings_type));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_timing_log = realloc(g_timing_log,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (g_timing_log_size+g_num_frames)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *sizeof(timings_type));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetGetIntegerv(ICET_MAX_IMAGE_SPLIT, &max_image_split);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (frame = 0; frame < g_num_frames; frame++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ timings_type *timing = &timing_array[frame];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -862,38 +1309,18 @@ static int SimpleTimingDoRender()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ UPDATE_MAX(buffer_read_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ UPDATE_MAX(buffer_write_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ UPDATE_MAX(compress_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ UPDATE_MAX(interlace_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ UPDATE_MAX(blend_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ UPDATE_MAX(draw_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ UPDATE_MAX(composite_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ UPDATE_MAX(collect_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- UPDATE_MAX(bytes_sent);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ UPDATE_MAX(frame_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ total_bytes_sent += timing_collection[p].bytes_sent;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timing->bytes_sent = total_bytes_sent;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf("LOG,%d,%s,%s,%d,%d,%d,%d,%s,%s,%s,%d,%d,%lg,%lg,%lg,%lg,%lg,%lg,%lg,%lg,%ld,%lg\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- num_proc,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- strategy_name,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- si_strategy_name,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- g_num_tiles_x,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- g_num_tiles_y,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- SCREEN_WIDTH,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- SCREEN_HEIGHT,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- g_transparent ? "yes" : "no",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- g_no_interlace ? "no" : "yes",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- g_no_collect ? "no" : "yes",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- max_image_split,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- frame,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- timing->render_time,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- timing->buffer_read_time,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- timing->buffer_write_time,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- timing->compress_time,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- timing->blend_time,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- timing->draw_time,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- timing->composite_time,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- timing->collect_time,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- (long int)total_bytes_sent,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- timing->frame_time);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_timing_log[g_timing_log_size] = *timing;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_timing_log_size++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -903,45 +1330,16 @@ static int SimpleTimingDoRender()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ free_region_divide(region_divisions);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ free(timing_array);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* This is to prevent a non-root from printing while the root is writing
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- the log. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetCommBarrier();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pre_rendered_image = icetImageNull();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (pre_rendered_image_buffer != NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ free(pre_rendered_image_buffer);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return TEST_PASSED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-int SimpleTimingRun()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int SimpleTimingDoParameterStudies()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (rank == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf("HEADER,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "num processes,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "multi-tile strategy,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "single-image strategy,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "tiles x,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "tiles y,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "width,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "height,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "transparent,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "interlacing,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "collection,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "max image split,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "frame,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "render time,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "buffer read time,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "buffer write time,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "compress time,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "blend time,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "draw time,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "composite time,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "collect time,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "bytes sent,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "frame time\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (g_do_magic_k_study) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTContext original_context = icetGetContext();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IceTInt magic_k;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -986,8 +1384,8 @@ int SimpleTimingRun()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icetGetIntegerv(ICET_MAGIC_K, &magic_k);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (image_split = g_min_image_split;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- image_split/magic_k < num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- image_split *= magic_k) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image_split <= num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ image_split *= 2) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ char image_split_string[64];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int retval;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1023,6 +1421,349 @@ int SimpleTimingRun()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTCommunicator MakeCommSubset(IceTInt size, IceTInt offset)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt32 *ranks;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank_index;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommunicator old_comm;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommunicator new_comm;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ranks = malloc(size*sizeof(IceTInt32));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (rank_index = 0; rank_index < size; rank_index++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ranks[rank_index] = rank_index + offset;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ old_comm = icetGetCommunicator();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ new_comm = old_comm->Subset(old_comm, size, ranks);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ free(ranks);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return new_comm;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int SimpleTimingDoScalingStudyFactor2()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt max_power_2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt min_size = g_num_tiles_x*g_num_tiles_y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTContext original_context = icetGetContext();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int worst_result = TEST_PASSED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int result = SimpleTimingDoParameterStudies();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (result != TEST_PASSED) { return result; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SimpleTimingCollectAndPrintLog();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_NUM_PROCESSES, &size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ max_power_2 = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ while (max_power_2 <= size) { max_power_2 *= 2; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ max_power_2 /= 2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((max_power_2 < size) && (max_power_2 >= min_size)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommunicator new_communicator = MakeCommSubset(max_power_2, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rank < max_power_2) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTContext new_context = icetCreateContext(new_communicator);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int result = SimpleTimingDoParameterStudies();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (result != TEST_PASSED) { worst_result = result; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSetContext(original_context);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetDestroyContext(new_context);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ new_communicator->Destroy(new_communicator);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt power_2 = max_power_2/2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt offset = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBoolean has_group = ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommunicator new_comm;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ while (power_2 >= min_size) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommunicator try_comm = MakeCommSubset(power_2, offset);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((rank >= offset) && (rank < offset+power_2)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ has_group = ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ new_comm = try_comm;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ offset += power_2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ power_2 /= 2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (has_group) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTContext new_context;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ new_context = icetCreateContext(new_comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ new_comm->Destroy(new_comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = SimpleTimingDoParameterStudies();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (result != TEST_PASSED) { worst_result = result; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSetContext(original_context);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetDestroyContext(new_context);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return worst_result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int SimpleTimingDoScalingStudyFactor2_3()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt max_power_3;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt min_size = g_num_tiles_x*g_num_tiles_y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTContext original_context = icetGetContext();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int worst_result = TEST_PASSED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ worst_result = SimpleTimingDoScalingStudyFactor2();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SimpleTimingCollectAndPrintLog();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_NUM_PROCESSES, &size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ max_power_3 = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ while (max_power_3 <= size) { max_power_3 *= 3; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ max_power_3 /= 3;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((max_power_3*2 < size) && (max_power_3*2 >= min_size)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommunicator new_communicator = MakeCommSubset(max_power_3*2, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rank < max_power_3*2) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTContext new_context = icetCreateContext(new_communicator);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int result = SimpleTimingDoParameterStudies();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (result != TEST_PASSED) { worst_result = result; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSetContext(original_context);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetDestroyContext(new_context);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ new_communicator->Destroy(new_communicator);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SimpleTimingCollectAndPrintLog();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // Start with a context with a power of three processes.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommunicator new_comm = MakeCommSubset(max_power_3, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (new_comm == ICET_COMM_NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // This rank is not participating in the rest of the tests.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return worst_result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCreateContext(new_comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ new_comm->Destroy(new_comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (max_power_3 < 3) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // Corner case where we are running with to few processes to make
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // any factors. The code below can break, so just bail.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetDestroyContext(icetGetContext());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSetContext(original_context);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return worst_result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((max_power_3 < size) && (max_power_3 >= min_size)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rank < max_power_3) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int result = SimpleTimingDoParameterStudies();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (result != TEST_PASSED) { worst_result = result; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SimpleTimingCollectAndPrintLog();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // This loop will run in log_3 iterations selecting any factors of 2 and 3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // it finds. Let us say max_power_3 = 3^N. The iterations of the loop
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // break up the processors is partitions of 1/3 and 2/3 as follows.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // (Iteration 0 was just done above.)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ //
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // Iteration 0: |---------------------------3^N--------------------------|
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // Iteration 1: |------3^(N-1)-----|--------------2*3^(N-1)--------------|
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // Iteration 2: |3^(N-2)|2*3^(N-2)-|-(removed)-|--------4*3^(N-2)--------|
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // ...
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ //
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // Note that some of the partitions are removed because they are repeates.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // In the example above, the removed partition is of size 2*3^(N-2), which
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // is the same size of another partition in the tree. In general, when we
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // break up a partition that is not a power of 3, we only generate the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // partition that is 2/3 because the 1/3 partition is created elsewhere.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // A partition that is exactly a power of 3 (no factors of 2) has both
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // subpartitions created.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ //
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ while (ICET_TRUE) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt last_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt last_rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt this_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommunicator comm_third;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommunicator comm_two_thirds;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTContext old_context = icetGetContext();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_NUM_PROCESSES, &last_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_RANK, &last_rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ this_size = last_size/3;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (this_size%3 != 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // Next smallest comms have no factors of 3. Must be only
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // factors of two, and we have done that.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // By simple factoring, we can split the last communicator into one
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // piece a third of its size and another peice 2/3 the size, and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // those combined will use all the processes.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm_third = MakeCommSubset(this_size, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm_two_thirds = MakeCommSubset(2*this_size, this_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetDestroyContext(old_context);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (last_rank < this_size) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCreateContext(comm_third);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm_third->Destroy(comm_third);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (this_size%2 == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // If this size already has a factor of two, we can drop it.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // See the description above.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCreateContext(comm_two_thirds);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm_two_thirds->Destroy(comm_two_thirds);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ this_size *= 2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (this_size < min_size) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // Group has gotten too small to handle these tiles.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = SimpleTimingDoParameterStudies();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (result != TEST_PASSED) { worst_result = result; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetDestroyContext(icetGetContext());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSetContext(original_context);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return worst_result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int SimpleTimingDoScalingStudyRandom()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt min_size = g_num_tiles_x*g_num_tiles_y;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTContext original_context = icetGetContext();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int worst_result = TEST_PASSED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt trial;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt *pivots;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_NUM_PROCESSES, &size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Choose pivot points to bifurcate processes. Do them all at once here
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * so the psudorandom numbers do not interfear with those choosen during
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * the rendering. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pivots = malloc(sizeof(IceTInt)*g_num_scaling_study_random);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ srand(g_seed);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (trial = 0; trial < g_num_scaling_study_random; trial++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pivots[trial] = rand()%size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (trial = 0; trial < g_num_scaling_study_random; trial++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommunicator left_comm;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommunicator right_comm;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt left_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt right_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt local_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Print out results from last run. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SimpleTimingCollectAndPrintLog();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ left_size = pivots[trial];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ right_size = size-left_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ left_comm = MakeCommSubset(left_size, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ right_comm = MakeCommSubset(right_size, left_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rank < left_size) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCreateContext(left_comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ left_comm->Destroy(left_comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ local_size = left_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCreateContext(right_comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ right_comm->Destroy(right_comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ local_size = right_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (local_size > min_size) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = SimpleTimingDoParameterStudies();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (result != TEST_PASSED) { worst_result = result; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetDestroyContext(icetGetContext());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetSetContext(original_context);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ free(pivots);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return worst_result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int SimpleTimingDoScalingStudies()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (g_do_scaling_study_factor_2_3) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = SimpleTimingDoScalingStudyFactor2_3();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if (g_do_scaling_study_factor_2) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = SimpleTimingDoScalingStudyFactor2();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = SimpleTimingDoParameterStudies();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (g_num_scaling_study_random > 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int new_result = SimpleTimingDoScalingStudyRandom();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (new_result != TEST_PASSED) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = new_result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SimpleTimingCollectAndPrintLog();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int SimpleTimingRun()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rank == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("HEADER,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "num processes,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "multi-tile strategy,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "single-image strategy,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "tiles x,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "tiles y,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "width,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "height,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "zoom,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "transparent,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "interlacing,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "collection,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "dense images,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "max image split,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "frame,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "render time,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "buffer read time,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "buffer write time,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "compress time,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "interlace time,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "blend time,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "draw time,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "composite time,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "collect time,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "bytes sent,"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "frame time\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_timing_log = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_timing_log_size = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return SimpleTimingDoScalingStudies();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int SimpleTiming(int argc, char * argv[])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ parse_arguments(argc, argv);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/SparseImageCopy.c tests/SparseImageCopy.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d4fff22..3837b6e 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/SparseImageCopy.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/SparseImageCopy.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,7 +10,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *****************************************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <IceTDevImage.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/init.c tests/init.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+deleted file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 3399c78..0000000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/init.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,434 +0,0 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-/* -*- c -*- *******************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * Copyright (C) 2003 Sandia Corporation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * the U.S. Government retains certain rights in this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef ICET_TESTS_USE_OPENGL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <IceTGL.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <IceTDevCommunication.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifndef __USE_POSIX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define __USE_POSIX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <stdio.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <stdarg.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <string.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <sys/types.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <sys/stat.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <fcntl.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef ICET_TESTS_USE_OPENGL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifndef __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <GL/glut.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <GL/gl.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <GLUT/glut.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <OpenGL/gl.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifndef WIN32
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <unistd.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <io.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define dup(fildes) _dup(fildes)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define dup2(fildes, fildes2) _dup2(fildes, fildes2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-IceTEnum strategy_list[5];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-int STRATEGY_LIST_SIZE = 5;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-/* int STRATEGY_LIST_SIZE = 1; */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-IceTEnum single_image_strategy_list[4];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-int SINGLE_IMAGE_STRATEGY_LIST_SIZE = 4;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-/* int SINGLE_IMAGE_STRATEGY_LIST_SIZE = 1; */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-IceTSizeType SCREEN_WIDTH;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-IceTSizeType SCREEN_HEIGHT;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef ICET_TESTS_USE_OPENGL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static int windowId;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static int (*test_function)(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif /* ICET_TESTS_USE_OPENGL */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef ICET_TESTS_USE_OPENGL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void checkOglError(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- GLenum error = glGetError();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define CASE_ERROR(ename) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case ename: printrank("## Current IceT error = " #ename "\n"); break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- switch (error) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CASE_ERROR(GL_NO_ERROR);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CASE_ERROR(GL_INVALID_ENUM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CASE_ERROR(GL_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CASE_ERROR(GL_INVALID_OPERATION);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CASE_ERROR(GL_STACK_OVERFLOW);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CASE_ERROR(GL_STACK_UNDERFLOW);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CASE_ERROR(GL_OUT_OF_MEMORY);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef GL_TABLE_TOO_LARGE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CASE_ERROR(GL_TABLE_TOO_LARGE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printrank("## UNKNOWN OPENGL ERROR CODE!!!!!!\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#undef CASE_ERROR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif /* ICET_TESTS_USE_OPENGL */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void checkIceTError(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTEnum error = icetGetError();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define CASE_ERROR(ename) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case ename: printrank("## Current IceT error = " #ename "\n"); break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- switch (error) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CASE_ERROR(ICET_NO_ERROR);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CASE_ERROR(ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CASE_ERROR(ICET_INVALID_ENUM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CASE_ERROR(ICET_BAD_CAST);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CASE_ERROR(ICET_OUT_OF_MEMORY);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CASE_ERROR(ICET_INVALID_OPERATION);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CASE_ERROR(ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printrank("## UNKNOWN ICET ERROR CODE!!!!!\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#undef CASE_ERROR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-/* Just in case I need to actually print stuff out to the screen in the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- future. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static FILE *realstdout;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void realprintf(const char *fmt, ...)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- va_list ap;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (realstdout != NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- va_start(ap, fmt);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- vfprintf(realstdout, fmt, ap);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- va_end(ap);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- fflush(realstdout);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-void printstat(const char *fmt, ...)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- va_list ap;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if ((rank == 0) || (realstdout == NULL)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- va_start(ap, fmt);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- vprintf(fmt, ap);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- va_end(ap);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- fflush(stdout);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-void printrank(const char *fmt, ...)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- va_list ap;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf("%d> ", rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- va_start(ap, fmt);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- vprintf(fmt, ap);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- va_end(ap);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- fflush(stdout);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static IceTContext context;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void usage(char **argv)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf("\nUSAGE: %s [options] [-R] testname [testargs]\n", argv[0]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf("\nWhere options are:\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf(" -width <n> Width of window (default n=1024)\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf(" -height <n> Height of window (default n=768).\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf(" -display <display>\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf(" X server each node contacts. Default display=localhost:0\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf(" -logdebug Add debugging statements. Provides more information, but\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf(" makes identifying errors, warnings, and statuses harder\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf(" -redirect Redirect standard output to log.????, where ???? is the rank\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf(" -- Parse no more arguments.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf(" -h, -help This help message.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-void initialize_test(int *argcp, char ***argvp, IceTCommunicator comm)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int arg;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int argc = *argcp;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- char **argv = *argvp;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int width = 1024;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int height = 768;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTBitField diag_level = ICET_DIAG_ALL_NODES | ICET_DIAG_WARNINGS;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int redirect = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int rank, num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- rank = (*comm->Comm_rank)(comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- num_proc = (*comm->Comm_size)(comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* This is convenient code to attach a debugger to a particular process at the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- start of a test. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* if (rank == 0) { */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* int i = 0; */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* printf("Waiting in process %d\n", getpid()); */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* while (i == 0) sleep(1); */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* } */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef ICET_TESTS_USE_OPENGL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Let Glut have first pass at the arguments to grab any that it can use. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glutInit(argcp, *argvp);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Parse my arguments. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for (arg = 1; arg < argc; arg++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (strcmp(argv[arg], "-width") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- width = atoi(argv[++arg]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- } else if (strcmp(argv[arg], "-height") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- height = atoi(argv[++arg]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- } else if (strcmp(argv[arg], "-logdebug") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- diag_level = ICET_DIAG_FULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- } else if (strcmp(argv[arg], "-redirect") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- redirect = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- } else if ( (strcmp(argv[arg], "-h") == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- || (strcmp(argv[arg], "-help") == 0) ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- usage(argv);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- exit(0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- } else if ( (strcmp(argv[arg], "-R") == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- || (strncmp(argv[arg], "-", 1) != 0) ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- } else if (strcmp(argv[arg], "--") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- arg++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf("Unknown options `%s'. Try -h for help.\n", argv[arg]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- exit(1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Fix arguments for next bout of parsing. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- *argcp = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for ( ; arg < argc; arg++, (*argcp)++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- argv[*argcp] = argv[arg];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- argc = *argcp;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Make sure selected options are consistent. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if ((num_proc > 1) && (argc < 2)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf("You must select a test on the command line when using more than one process.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf("Try -h for help.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- exit(1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (redirect && (argc < 2)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf("You must select a test on the command line when redirecting the output.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf("Try -h for help.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- exit(1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef ICET_TESTS_USE_OPENGL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Create a renderable window. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH | GLUT_ALPHA);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glutInitWindowPosition(0, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glutInitWindowSize(width, height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- char title[256];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sprintf(title, "IceT Test %d of %d", rank, num_proc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- windowId = glutCreateWindow(title);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif /* ICET_TESTS_USE_OPENGL */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- SCREEN_WIDTH = width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- SCREEN_HEIGHT = height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Create an IceT context. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- context = icetCreateContext(comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetDiagnostics(diag_level);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef ICET_TESTS_USE_OPENGL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetGLInitialize();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Redirect standard output on demand. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (redirect) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- char filename[64];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int outfd;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (rank == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- realstdout = fdopen(dup(1), "wt");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- realstdout = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sprintf(filename, "log.%04d", rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- outfd = open(filename, O_WRONLY | O_CREAT | O_APPEND, 0644);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (outfd < 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf("Could not open %s for writing.\n", filename);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- exit(1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- dup2(outfd, 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- realstdout = stdout;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- strategy_list[0] = ICET_STRATEGY_DIRECT;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- strategy_list[1] = ICET_STRATEGY_SEQUENTIAL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- strategy_list[2] = ICET_STRATEGY_SPLIT;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- strategy_list[3] = ICET_STRATEGY_REDUCE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- strategy_list[4] = ICET_STRATEGY_VTREE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- single_image_strategy_list[0] = ICET_SINGLE_IMAGE_STRATEGY_AUTOMATIC;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- single_image_strategy_list[1] = ICET_SINGLE_IMAGE_STRATEGY_BSWAP;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- single_image_strategy_list[2] = ICET_SINGLE_IMAGE_STRATEGY_RADIXK;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- single_image_strategy_list[3] = ICET_SINGLE_IMAGE_STRATEGY_TREE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-IceTBoolean strategy_uses_single_image_strategy(IceTEnum strategy)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- switch (strategy) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case ICET_STRATEGY_DIRECT: return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case ICET_STRATEGY_SEQUENTIAL: return ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case ICET_STRATEGY_SPLIT: return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case ICET_STRATEGY_REDUCE: return ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case ICET_STRATEGY_VTREE: return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printrank("ERROR: unknown strategy type.");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef ICET_TESTS_USE_OPENGL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void no_op()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void glut_draw()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glEnable(GL_DEPTH_TEST);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glViewport(0, 0, (GLsizei)SCREEN_WIDTH, (GLsizei)SCREEN_HEIGHT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glClear(GL_COLOR_BUFFER_BIT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- swap_buffers();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- result = test_function();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- finalize_test(result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- exit(result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-int run_test(int (*tf)(void))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Record the test function so we can run it in the Glut draw callback. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- test_function = tf;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glutDisplayFunc(no_op);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glutIdleFunc(glut_draw);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* Glut will reliably create the OpenGL context only after the main loop is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * started. This will create the window and then call our glut_draw function
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * to populate it. It will never return, which is why we call exit in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * glut_draw. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glutMainLoop();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* We do not expect to be here. Raise an alert to signal that the tests are
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * not running as expected. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return TEST_NOT_PASSED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#else /* ICET_TESTS_USE_OPENGL */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-int run_test(int (*tf)(void))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- result = tf();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- finalize_test(result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif /* ICET_TESTS_USE_OPENGL */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef ICET_TESTS_USE_OPENGL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-void swap_buffers(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glutSwapBuffers();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define TEST_RESULT_TAG 3492
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern void finalize_communication(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-void finalize_test(IceTInt result)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTInt num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef ICET_TESTS_USE_OPENGL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- checkOglError();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- checkIceTError();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetGetIntegerv(ICET_NUM_PROCESSES, &num_proc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (rank == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTInt p_id;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for (p_id = 1; p_id < num_proc; p_id++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTInt remote_result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetCommRecv(&remote_result, 1, ICET_INT, p_id, TEST_RESULT_TAG);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (remote_result != TEST_PASSED) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- result = remote_result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- switch (result) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case TEST_PASSED:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf("***Test Passed***\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case TEST_NOT_RUN:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf("***TEST NOT RUN***\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case TEST_NOT_PASSED:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf("***TEST NOT PASSED***\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case TEST_FAILED:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf("***TEST FAILED***\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetCommSend(&result, 1, ICET_INT, 0, TEST_RESULT_TAG);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetDestroyContext(context);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- finalize_communication();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef ICET_TESTS_USE_OPENGL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- glutDestroyWindow(windowId);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/mpi_comm.h tests/mpi_comm.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+deleted file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index cedc661..0000000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/mpi_comm.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,33 +0,0 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-/* -*- c -*- *******************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * Copyright (C) 2003 Sandia Corporation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * the U.S. Government retains certain rights in this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifndef _MPI_COMM_H_
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define _MPI_COMM_H_
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <IceTMPI.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-void init_mpi_comm(int *argcp, char ***argvp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- IceTCommunicator comm;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- MPI_Init(argcp, argvp);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- comm = icetCreateMPICommunicator(MPI_COMM_WORLD);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- initialize_test(argcp, argvp, comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- icetDestroyMPICommunicator(comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-void finalize_communication(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- MPI_Finalize();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif /*_MPI_COMM_H_*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/ppm.c tests/ppm.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index b956457..bcab5c4 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/ppm.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/ppm.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -7,7 +7,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdio.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/test-config.h.in tests/test-config.h.in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+deleted file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 3cc72ac..0000000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/test-config.h.in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,10 +0,0 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-/* -*- c -*- *******************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * Copyright (C) 2010 Sandia Corporation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * the U.S. Government retains certain rights in this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#cmakedefine ICET_TESTS_USE_OPENGL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/test-util.h tests/test-util.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+deleted file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0eaede9..0000000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/test-util.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,60 +0,0 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-/* -*- c -*- *******************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * Copyright (C) 2003 Sandia Corporation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * the U.S. Government retains certain rights in this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifndef _TEST_UTIL_H_
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define _TEST_UTIL_H_
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include "test-config.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef __cplusplus
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern "C" {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <IceT.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern IceTEnum strategy_list[];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern int STRATEGY_LIST_SIZE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern IceTEnum single_image_strategy_list[];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern int SINGLE_IMAGE_STRATEGY_LIST_SIZE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern IceTSizeType SCREEN_WIDTH;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern IceTSizeType SCREEN_HEIGHT;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-void initialize_test(int *argcp, char ***argvp, IceTCommunicator comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-int run_test(int (*test_function)(void));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-/* Used like printf but prints status only on process 0 or to independent
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- logs. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-void printstat(const char *fmt, ...);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-/* Like printf but adds the rank of the local process. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-void printrank(const char *fmt, ...);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef ICET_TESTS_USE_OPENGL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-void swap_buffers(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-void finalize_test(IceTInt result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-void write_ppm(const char *filename,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const IceTUByte *image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int width, int height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-IceTBoolean strategy_uses_single_image_strategy(IceTEnum strategy);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef __cplusplus
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif /*_TEST_UTIL_H_*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/test_common.c tests/test_common.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+new file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0000000..03eeba5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/test_common.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,317 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* -*- c -*- *******************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Copyright (C) 2015 Sandia Corporation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * the U.S. Government retains certain rights in this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceTDevCommunication.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef __USE_POSIX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define __USE_POSIX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdio.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdarg.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <string.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <sys/types.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <sys/stat.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <fcntl.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef WIN32
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <unistd.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <io.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define dup(fildes) _dup(fildes)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define dup2(fildes, fildes2) _dup2(fildes, fildes2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IceTEnum strategy_list[5];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int STRATEGY_LIST_SIZE = 5;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* int STRATEGY_LIST_SIZE = 1; */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IceTEnum single_image_strategy_list[6];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int SINGLE_IMAGE_STRATEGY_LIST_SIZE = 6;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* int SINGLE_IMAGE_STRATEGY_LIST_SIZE = 1; */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IceTSizeType SCREEN_WIDTH;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IceTSizeType SCREEN_HEIGHT;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void checkIceTError(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTEnum error = icetGetError();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define CASE_ERROR(ename) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ename: printrank("## Current IceT error = " #ename "\n"); break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ switch (error) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_NO_ERROR: break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CASE_ERROR(ICET_SANITY_CHECK_FAIL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CASE_ERROR(ICET_INVALID_ENUM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CASE_ERROR(ICET_BAD_CAST);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CASE_ERROR(ICET_OUT_OF_MEMORY);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CASE_ERROR(ICET_INVALID_OPERATION);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CASE_ERROR(ICET_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("## UNKNOWN ICET ERROR CODE!!!!!\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#undef CASE_ERROR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Just in case I need to actually print stuff out to the screen in the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ future. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static FILE *realstdout;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void realprintf(const char *fmt, ...)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ va_list ap;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (realstdout != NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ va_start(ap, fmt);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ vfprintf(realstdout, fmt, ap);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ va_end(ap);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fflush(realstdout);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void printstat(const char *fmt, ...)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ va_list ap;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((rank == 0) || (realstdout == NULL)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ va_start(ap, fmt);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ vprintf(fmt, ap);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ va_end(ap);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fflush(stdout);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void printrank(const char *fmt, ...)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ va_list ap;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("%d> ", rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ va_start(ap, fmt);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ vprintf(fmt, ap);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ va_end(ap);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fflush(stdout);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static IceTContext context;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void usage(char **argv)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("\nUSAGE: %s [options] [-R] testname [testargs]\n", argv[0]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("\nWhere options are:\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf(" -width <n> Width of window (default n=1024)\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf(" -height <n> Height of window (default n=768).\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf(" -display <display>\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf(" X server each node contacts. Default display=localhost:0\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf(" -logdebug Add debugging statements. Provides more information, but\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf(" makes identifying errors, warnings, and statuses harder\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf(" -redirect Redirect standard output to log.????, where ???? is the rank\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf(" -- Parse no more arguments.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf(" -h, -help This help message.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern void initialize_render_window(int width, int height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void initialize_test(int *argcp, char ***argvp, IceTCommunicator comm)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int arg;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int argc = *argcp;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ char **argv = *argvp;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int width = 1024;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int height = 768;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTBitField diag_level = ICET_DIAG_ALL_NODES | ICET_DIAG_WARNINGS;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int redirect = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int rank, num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ rank = (*comm->Comm_rank)(comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ num_proc = (*comm->Comm_size)(comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* This is convenience code to attach a debugger to a particular process at
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ the start of a test. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rank == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int i = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("Waiting in process %d\n", getpid());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ while (i == 0) sleep(1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Parse my arguments. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (arg = 1; arg < argc; arg++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (strcmp(argv[arg], "-width") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ width = atoi(argv[++arg]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if (strcmp(argv[arg], "-height") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ height = atoi(argv[++arg]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if (strcmp(argv[arg], "-logdebug") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ diag_level = ICET_DIAG_FULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if (strcmp(argv[arg], "-redirect") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ redirect = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if ( (strcmp(argv[arg], "-h") == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ || (strcmp(argv[arg], "-help") == 0) ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ usage(argv);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ exit(0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if ( (strcmp(argv[arg], "-R") == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ || (strncmp(argv[arg], "-", 1) != 0) ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else if (strcmp(argv[arg], "--") == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ arg++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("Unknown options `%s'. Try -h for help.\n", argv[arg]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ exit(1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Fix arguments for next bout of parsing. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *argcp = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for ( ; arg < argc; arg++, (*argcp)++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ argv[*argcp] = argv[arg];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ argc = *argcp;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Make sure selected options are consistent. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((num_proc > 1) && (argc < 2)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("You must select a test on the command line when using more than one process.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("Try -h for help.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ exit(1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (redirect && (argc < 2)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("You must select a test on the command line when redirecting the output.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("Try -h for help.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ exit(1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SCREEN_WIDTH = width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SCREEN_HEIGHT = height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Create an IceT context. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ context = icetCreateContext(comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetDiagnostics(diag_level);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ initialize_render_window(width, height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Redirect standard output on demand. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (redirect) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ char filename[64];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int outfd;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rank == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ realstdout = fdopen(dup(1), "wt");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ realstdout = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sprintf(filename, "log.%04d", rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ outfd = open(filename, O_WRONLY | O_CREAT | O_APPEND, 0644);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (outfd < 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("Could not open %s for writing.\n", filename);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ exit(1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ dup2(outfd, 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ realstdout = stdout;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ strategy_list[0] = ICET_STRATEGY_DIRECT;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ strategy_list[1] = ICET_STRATEGY_SEQUENTIAL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ strategy_list[2] = ICET_STRATEGY_SPLIT;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ strategy_list[3] = ICET_STRATEGY_REDUCE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ strategy_list[4] = ICET_STRATEGY_VTREE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ single_image_strategy_list[0] = ICET_SINGLE_IMAGE_STRATEGY_AUTOMATIC;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ single_image_strategy_list[1] = ICET_SINGLE_IMAGE_STRATEGY_BSWAP;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ single_image_strategy_list[2] = ICET_SINGLE_IMAGE_STRATEGY_RADIXK;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ single_image_strategy_list[3] = ICET_SINGLE_IMAGE_STRATEGY_RADIXKR;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ single_image_strategy_list[4] = ICET_SINGLE_IMAGE_STRATEGY_TREE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ single_image_strategy_list[5] = ICET_SINGLE_IMAGE_STRATEGY_BSWAP_FOLDING;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IceTBoolean strategy_uses_single_image_strategy(IceTEnum strategy)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ switch (strategy) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_STRATEGY_DIRECT: return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_STRATEGY_SEQUENTIAL: return ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_STRATEGY_SPLIT: return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_STRATEGY_REDUCE: return ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ICET_STRATEGY_VTREE: return ICET_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("ERROR: unknown strategy type.");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ICET_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int run_test_base(int (*test_function)(void))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = test_function();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ finalize_test(result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define TEST_RESULT_TAG 3492
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern void finalize_rendering(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern void finalize_communication(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void finalize_test(IceTInt result)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ finalize_rendering();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ checkIceTError();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_NUM_PROCESSES, &num_proc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rank == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt p_id;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (p_id = 1; p_id < num_proc; p_id++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt remote_result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCommRecv(&remote_result, 1, ICET_INT, p_id, TEST_RESULT_TAG);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (remote_result != TEST_PASSED) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = remote_result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ switch (result) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case TEST_PASSED:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("***Test Passed***\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case TEST_NOT_RUN:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("***TEST NOT RUN***\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case TEST_NOT_PASSED:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("***TEST NOT PASSED***\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case TEST_FAILED:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("***TEST FAILED***\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetCommSend(&result, 1, ICET_INT, 0, TEST_RESULT_TAG);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetDestroyContext(context);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ finalize_communication();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/test_config.h.in tests/test_config.h.in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+new file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0000000..6f7b6f5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/test_config.h.in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,14 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* -*- c -*- *******************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Copyright (C) 2010 Sandia Corporation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * the U.S. Government retains certain rights in this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#cmakedefine ICET_TESTS_USE_OPENGL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#cmakedefine ICET_TESTS_USE_GLUT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#cmakedefine ICET_TESTS_USE_GLFW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/test_mpi.h tests/test_mpi.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+new file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0000000..cda6e45
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/test_mpi.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,49 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* -*- c -*- *******************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Copyright (C) 2003 Sandia Corporation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * the U.S. Government retains certain rights in this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef _TEST_MPI_H_
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define _TEST_MPI_H_
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_util.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceTMPI.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern int run_test_base(int (*test_function)(void));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void init_mpi(int *argcp, char ***argvp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTCommunicator comm;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MPI_Init(argcp, argvp);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ comm = icetCreateMPICommunicator(MPI_COMM_WORLD);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ initialize_test(argcp, argvp, comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetDestroyMPICommunicator(comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void finalize_communication(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MPI_Finalize();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef ICET_NO_MPI_RENDERING_FUNCTIONS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int run_test(int (*test_function)())
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return run_test_base(test_function);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void initialize_render_window(int width, int height)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (void)width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (void)height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void swap_buffers() { }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void finalize_rendering() { }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif /* !ICET_NO_MPI_RENDERING_FUNCTIONS */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif /*_TEST_MPI_H_*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/test_mpi_opengl.h tests/test_mpi_opengl.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+new file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0000000..fcda24d
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/test_mpi_opengl.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,212 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* -*- c -*- *******************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Copyright (C) 2015 Sandia Corporation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * the U.S. Government retains certain rights in this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef _TEST_MPI_OPENGL_H
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define _TEST_MPI_OPENGL_H
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ICET_NO_MPI_RENDERING_FUNCTIONS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_mpi.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_config.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceTGL.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef ICET_TESTS_USE_GLUT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <GL/glut.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <GLUT/glut.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef ICET_TESTS_USE_GLFW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <GLFW/glfw3.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef ICET_TESTS_USE_GLUT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int windowId;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef ICET_TESTS_USE_GLFW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static GLFWwindow *window;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_codes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void checkOglError(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ GLenum error = glGetError();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define CASE_ERROR(ename) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case ename: printrank("## Current IceT error = " #ename "\n"); break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ switch (error) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case GL_NO_ERROR: break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CASE_ERROR(GL_INVALID_ENUM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CASE_ERROR(GL_INVALID_VALUE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CASE_ERROR(GL_INVALID_OPERATION);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CASE_ERROR(GL_STACK_OVERFLOW);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CASE_ERROR(GL_STACK_UNDERFLOW);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CASE_ERROR(GL_OUT_OF_MEMORY);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef GL_TABLE_TOO_LARGE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CASE_ERROR(GL_TABLE_TOO_LARGE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printrank("## UNKNOWN OPENGL ERROR CODE!!!!!!\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#undef CASE_ERROR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void init_mpi_opengl(int *argcp, char ***argvp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef ICET_TESTS_USE_GLUT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Let Glut have first pass at the arguments to grab any that it can use. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glutInit(argcp, *argvp);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef ICET_TESTS_USE_GLFW
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!glfwInit()) { exit(1); }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ init_mpi(argcp, argvp);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(ICET_TESTS_USE_GLUT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int (*g_test_function)(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void no_op()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static void glut_draw()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glEnable(GL_DEPTH_TEST);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glViewport(0, 0, (GLsizei)SCREEN_WIDTH, (GLsizei)SCREEN_HEIGHT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glClear(GL_COLOR_BUFFER_BIT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ swap_buffers();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = run_test_base(g_test_function);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glutDestroyWindow(windowId);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ exit(result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int run_test(int (*test_function)(void))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Record the test function so we can run it in the Glut draw callback. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ g_test_function = test_function;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glutDisplayFunc(no_op);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glutIdleFunc(glut_draw);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Glut will reliably create the OpenGL context only after the main loop is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * started. This will create the window and then call our glut_draw function
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * to populate it. It will never return, which is why we call exit in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * glut_draw. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glutMainLoop();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* We do not expect to be here. Raise an alert to signal that the tests are
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * not running as expected. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return TEST_NOT_PASSED;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void initialize_render_window(int width, int height)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank, num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_NUM_PROCESSES, &num_proc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Create a renderable window. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH | GLUT_ALPHA);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glutInitWindowPosition(0, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glutInitWindowSize(width, height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ char title[256];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sprintf(title, "IceT Test %d of %d", rank, num_proc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ windowId = glutCreateWindow(title);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGLInitialize();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void swap_buffers(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glutSwapBuffers();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif defined(ICET_TESTS_USE_GLFW)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int run_test(int (*test_function)())
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glEnable(GL_DEPTH_TEST);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glViewport(0, 0, (GLsizei)SCREEN_WIDTH, (GLsizei)SCREEN_HEIGHT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glClear(GL_COLOR_BUFFER_BIT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ swap_buffers();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = run_test_base(test_function);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glfwDestroyWindow(window);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glfwTerminate();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void initialize_render_window(int width, int height)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IceTInt rank, num_proc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_RANK, &rank);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGetIntegerv(ICET_NUM_PROCESSES, &num_proc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Create a renderable window. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glfwWindowHint(GLFW_RED_BITS, 8);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glfwWindowHint(GLFW_GREEN_BITS, 8);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glfwWindowHint(GLFW_BLUE_BITS, 8);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glfwWindowHint(GLFW_ALPHA_BITS, 8);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glfwWindowHint(GLFW_DEPTH_BITS, 24);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glfwWindowHint(GLFW_SAMPLES, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ char title[256];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sprintf(title, "IceT Test %d of %d", rank, num_proc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ window = glfwCreateWindow(width, height, title, NULL, NULL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glfwMakeContextCurrent(window);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ icetGLInitialize();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void swap_buffers(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glfwSwapBuffers(window);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ glfwPollEvents();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#error "ICET_TESTS_USE_OPENGL defined but no window library is defined."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void finalize_rendering()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ checkOglError();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif /* _TEST_MPI_OPENGL_H */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/test_util.h tests/test_util.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+new file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0000000..6428727
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/test_util.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,58 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* -*- c -*- *******************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Copyright (C) 2003 Sandia Corporation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * the U.S. Government retains certain rights in this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * This source code is released under the New BSD License.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef _TEST_UTIL_H_
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define _TEST_UTIL_H_
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "test_config.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef __cplusplus
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern "C" {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IceT.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern IceTEnum strategy_list[];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern int STRATEGY_LIST_SIZE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern IceTEnum single_image_strategy_list[];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern int SINGLE_IMAGE_STRATEGY_LIST_SIZE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern IceTSizeType SCREEN_WIDTH;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern IceTSizeType SCREEN_HEIGHT;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void initialize_test(int *argcp, char ***argvp, IceTCommunicator comm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int run_test(int (*test_function)(void));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Used like printf but prints status only on process 0 or to independent
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ logs. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void printstat(const char *fmt, ...);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Like printf but adds the rank of the local process. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void printrank(const char *fmt, ...);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void swap_buffers(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void finalize_test(IceTInt result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void write_ppm(const char *filename,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const IceTUByte *image,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int width, int height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++IceTBoolean strategy_uses_single_image_strategy(IceTEnum strategy);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef __cplusplus
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif /*_TEST_UTIL_H_*/
</span></pre><pre style='margin:0'>
</pre>