Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Feb 2019 07:12:39 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r493246 - in head/graphics: . oidn oidn/files
Message-ID:  <201902180712.x1I7Cdol003896@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Mon Feb 18 07:12:38 2019
New Revision: 493246
URL: https://svnweb.freebsd.org/changeset/ports/493246

Log:
  New port: graphics/oidn: Intel(R) Open Image Denoise library

Added:
  head/graphics/oidn/
  head/graphics/oidn/Makefile   (contents, props changed)
  head/graphics/oidn/distinfo   (contents, props changed)
  head/graphics/oidn/files/
  head/graphics/oidn/files/patch-cmake_install.cmake   (contents, props changed)
  head/graphics/oidn/files/patch-common_thread.cpp   (contents, props changed)
  head/graphics/oidn/files/patch-common_thread.h   (contents, props changed)
  head/graphics/oidn/pkg-descr   (contents, props changed)
  head/graphics/oidn/pkg-plist   (contents, props changed)
Modified:
  head/graphics/Makefile

Modified: head/graphics/Makefile
==============================================================================
--- head/graphics/Makefile	Mon Feb 18 06:17:05 2019	(r493245)
+++ head/graphics/Makefile	Mon Feb 18 07:12:38 2019	(r493246)
@@ -591,6 +591,7 @@
     SUBDIR += ocrad
     SUBDIR += ocre
     SUBDIR += ogre3d
+    SUBDIR += oidn
     SUBDIR += okular
     SUBDIR += open3d
     SUBDIR += opencollada

Added: head/graphics/oidn/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/oidn/Makefile	Mon Feb 18 07:12:38 2019	(r493246)
@@ -0,0 +1,27 @@
+# $FreeBSD$
+
+PORTNAME=	oidn
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.8.1
+CATEGORIES=	graphics
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Intel(R) Open Image Denoise library
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE.txt
+
+LIB_DEPENDS=	libtbb.so:devel/tbb
+
+USES=		cmake compiler:c++11-lang
+USE_GITHUB=	yes
+GH_ACCOUNT=	OpenImageDenoise
+GH_TUPLE=	OpenImageDenoise:oidn-weights:cd8e2ce:w/weights \
+		OpenImageDenoise:mkl-dnn:9507eb9:m/mkl-dnn
+USE_LDCONFIG=	yes
+
+OPTIONS_DEFINE=	DOCS
+
+DOCSDIR=	share/doc/${GH_ACCOUNT}
+
+.include <bsd.port.mk>

Added: head/graphics/oidn/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/oidn/distinfo	Mon Feb 18 07:12:38 2019	(r493246)
@@ -0,0 +1,7 @@
+TIMESTAMP = 1550471654
+SHA256 (OpenImageDenoise-oidn-v0.8.1_GH0.tar.gz) = f9ab0feb83cf5494448db0c147f35bfc4a834fdfb2e4d4910c6b6685fec14b27
+SIZE (OpenImageDenoise-oidn-v0.8.1_GH0.tar.gz) = 159658
+SHA256 (OpenImageDenoise-oidn-weights-cd8e2ce_GH0.tar.gz) = 7f242a227f641d3e2cc968b25db4825efc15feb11e4bb58ee2ee888c65f758fc
+SIZE (OpenImageDenoise-oidn-weights-cd8e2ce_GH0.tar.gz) = 31599866
+SHA256 (OpenImageDenoise-mkl-dnn-9507eb9_GH0.tar.gz) = 0e00ce128f4cb42ada6feebd71d768e04abab6ad9d80422645be657ac7140f0a
+SIZE (OpenImageDenoise-mkl-dnn-9507eb9_GH0.tar.gz) = 1413499

Added: head/graphics/oidn/files/patch-cmake_install.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/oidn/files/patch-cmake_install.cmake	Mon Feb 18 07:12:38 2019	(r493246)
@@ -0,0 +1,11 @@
+--- cmake/install.cmake.orig	2019-02-18 06:48:48 UTC
++++ cmake/install.cmake
+@@ -45,7 +45,7 @@ install(DIRECTORY include/OpenImageDenoi
+ ## Install documentation
+ ## ----------------------------------------------------------------------------
+ 
+-install(FILES ${PROJECT_SOURCE_DIR}/LICENSE.txt DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT lib)
++#install(FILES ${PROJECT_SOURCE_DIR}/LICENSE.txt DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT lib)
+ install(FILES ${PROJECT_SOURCE_DIR}/CHANGELOG.md DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT lib)
+ install(FILES ${PROJECT_SOURCE_DIR}/README.md DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT lib)
+ install(FILES ${PROJECT_SOURCE_DIR}/readme.pdf DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT lib)

Added: head/graphics/oidn/files/patch-common_thread.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/oidn/files/patch-common_thread.cpp	Mon Feb 18 07:12:38 2019	(r493246)
@@ -0,0 +1,56 @@
+--- common/thread.cpp.orig	2019-02-18 06:42:30 UTC
++++ common/thread.cpp
+@@ -14,6 +14,8 @@
+ // limitations under the License.                                           //
+ // ======================================================================== //
+ 
++#include <pthread_np.h>
++
+ #if defined(_MSC_VER)
+   #pragma warning (disable : 4146) // unary minus operator applied to unsigned type, result still unsigned
+ #endif
+@@ -132,7 +135,7 @@ namespace oidn {
+       OIDN_WARNING("SetThreadGroupAffinity failed");
+   }
+ 
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__FreeBSD__)
+ 
+   // --------------------------------------------------------------------------
+   // ThreadAffinity - Linux
+@@ -176,7 +179,7 @@ namespace oidn {
+ 
+     for (size_t i = 0; i < threadIds.size(); ++i)
+     {
+-      cpu_set_t affinity;
++      cpuset_t affinity;
+       CPU_ZERO(&affinity);
+       CPU_SET(threadIds[i], &affinity);
+ 
+@@ -193,7 +196,7 @@ namespace oidn {
+     const pthread_t thread = pthread_self();
+ 
+     // Save the current affinity
+-    if (pthread_getaffinity_np(thread, sizeof(cpu_set_t), &oldAffinities[threadIndex]) != 0)
++    if (pthread_getaffinity_np(thread, sizeof(cpuset_t), &oldAffinities[threadIndex]) != 0)
+     {
+       OIDN_WARNING("pthread_getaffinity_np failed");
+       oldAffinities[threadIndex] = affinities[threadIndex];
+@@ -201,7 +204,7 @@ namespace oidn {
+     }
+ 
+     // Set the new affinity
+-    if (pthread_setaffinity_np(thread, sizeof(cpu_set_t), &affinities[threadIndex]) != 0)
++    if (pthread_setaffinity_np(thread, sizeof(cpuset_t), &affinities[threadIndex]) != 0)
+       OIDN_WARNING("pthread_setaffinity_np failed");
+   }
+ 
+@@ -213,7 +216,7 @@ namespace oidn {
+     const pthread_t thread = pthread_self();
+ 
+     // Restore the original affinity
+-    if (pthread_setaffinity_np(thread, sizeof(cpu_set_t), &oldAffinities[threadIndex]) != 0)
++    if (pthread_setaffinity_np(thread, sizeof(cpuset_t), &oldAffinities[threadIndex]) != 0)
+       OIDN_WARNING("pthread_setaffinity_np failed");
+   }
+ 

Added: head/graphics/oidn/files/patch-common_thread.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/oidn/files/patch-common_thread.h	Mon Feb 18 07:12:38 2019	(r493246)
@@ -0,0 +1,24 @@
+--- common/thread.h.orig	2019-02-18 06:37:35 UTC
++++ common/thread.h
+@@ -142,7 +142,9 @@ namespace oidn {
+     void restore(int threadIndex);
+   };
+ 
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__FreeBSD__)
++
++#include <sys/cpuset.h>
+ 
+   // --------------------------------------------------------------------------
+   // ThreadAffinity - Linux
+@@ -151,8 +153,8 @@ namespace oidn {
+   class ThreadAffinity
+   {
+   private:
+-    std::vector<cpu_set_t> affinities;    // thread affinities
+-    std::vector<cpu_set_t> oldAffinities; // original thread affinities
++    std::vector<cpuset_t> affinities;    // thread affinities
++    std::vector<cpuset_t> oldAffinities; // original thread affinities
+ 
+   public:
+     ThreadAffinity(int numThreadsPerCore = INT_MAX);

Added: head/graphics/oidn/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/oidn/pkg-descr	Mon Feb 18 07:12:38 2019	(r493246)
@@ -0,0 +1,15 @@
+Intel Open Image Denoise is an open source library of high-performance,
+high-quality denoising filters for images rendered with ray tracing. Open Image
+Denoise is part of the Intel Rendering Framework and is released under the
+permissive Apache 2.0 license.
+
+The purpose of Open Image Denoise is to provide an open, high-quality,
+efficient, and easy-to-use denoising library that allows one to significantly
+reduce rendering times in ray tracing based rendering applications. It filters
+out the Monte Carlo noise inherent to stochastic ray tracing methods like path
+tracing, reducing the amount of necessary samples per pixel by even multiple
+orders of magnitude (depending on the desired closeness to the ground truth).
+A simple but flexible C/C++ API ensures that the library can be easily
+integrated into most existing or new rendering solutions.
+
+WWW: https://openimagedenoise.github.io/

Added: head/graphics/oidn/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/oidn/pkg-plist	Mon Feb 18 07:12:38 2019	(r493246)
@@ -0,0 +1,13 @@
+bin/denoise
+include/OpenImageDenoise/oidn.h
+include/OpenImageDenoise/oidn.hpp
+include/OpenImageDenoise/version.h
+lib/cmake/OpenImageDenoise/OpenImageDenoiseConfig-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/OpenImageDenoise/OpenImageDenoiseConfig.cmake
+lib/cmake/OpenImageDenoise/OpenImageDenoiseConfigVersion.cmake
+lib/libOpenImageDenoise.so
+lib/libOpenImageDenoise.so.0
+lib/libOpenImageDenoise.so.0.8.1
+%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG.md
+%%PORTDOCS%%%%DOCSDIR%%/README.md
+%%PORTDOCS%%%%DOCSDIR%%/readme.pdf



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902180712.x1I7Cdol003896>