[Bf-blender-cvs] [8283122] master: Added a new internal header for implicit solver defines.

Lukas Tönne noreply at git.blender.org
Tue Jan 20 09:49:57 CET 2015


Commit: 8283122cdaa8248c02ccf04ce050ffebf31ce9e8
Author: Lukas Tönne
Date:   Wed Sep 10 14:25:57 2014 +0200
Branches: master
https://developer.blender.org/rB8283122cdaa8248c02ccf04ce050ffebf31ce9e8

Added a new internal header for implicit solver defines.

Should become its own intern wrapper library eventually.

===================================================================

M	source/blender/blenkernel/CMakeLists.txt
M	source/blender/blenkernel/intern/implicit.c
A	source/blender/blenkernel/intern/implicit.h
M	source/blender/blenkernel/intern/implicit_eigen.cpp

===================================================================

diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index b0f6d450..a560bcc 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -107,9 +107,10 @@ set(SRC
 	intern/idprop.c
 	intern/image.c
 	intern/image_gen.c
-	intern/implicit.c
+        intern/implicit.h
+        intern/implicit.c
 	intern/implicit_eigen.cpp
-	intern/ConstrainedConjugateGradient.h # XXX move this to a better place
+        intern/ConstrainedConjugateGradient.h # XXX move this to a better place
 	intern/ipo.c
 	intern/key.c
 	intern/lamp.c
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c
index 4081a60..4a2cbd5 100644
--- a/source/blender/blenkernel/intern/implicit.c
+++ b/source/blender/blenkernel/intern/implicit.c
@@ -29,7 +29,7 @@
  *  \ingroup bke
  */
 
-//#define IMPLICIT_SOLVER_BLENDER
+#include "implicit.h"
 
 #ifdef IMPLICIT_SOLVER_BLENDER
 
@@ -50,7 +50,6 @@
 #include "BKE_effect.h"
 #include "BKE_global.h"
 
-
 #ifdef __GNUC__
 #  pragma GCC diagnostic ignored "-Wtype-limits"
 #endif
diff --git a/source/blender/blenkernel/intern/implicit.h b/source/blender/blenkernel/intern/implicit.h
new file mode 100644
index 0000000..dd12cb9
--- /dev/null
+++ b/source/blender/blenkernel/intern/implicit.h
@@ -0,0 +1,38 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) Blender Foundation
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Lukas Toenne
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef __BKE_IMPLICIT_H__
+#define __BKE_IMPLICIT_H__
+
+/** \file implicit.h
+ *  \ingroup bke
+ */
+
+#define IMPLICIT_SOLVER_EIGEN
+//#define IMPLICIT_SOLVER_BLENDER
+
+#endif
diff --git a/source/blender/blenkernel/intern/implicit_eigen.cpp b/source/blender/blenkernel/intern/implicit_eigen.cpp
index 7c28c0d..e4f1d11 100644
--- a/source/blender/blenkernel/intern/implicit_eigen.cpp
+++ b/source/blender/blenkernel/intern/implicit_eigen.cpp
@@ -29,13 +29,13 @@
  *  \ingroup bke
  */
 
-#define IMPLICIT_SOLVER_EIGEN
+#include "implicit.h"
+
+#ifdef IMPLICIT_SOLVER_EIGEN
 
 //#define USE_EIGEN_CORE
 #define USE_EIGEN_CONSTRAINED_CG
 
-#ifdef IMPLICIT_SOLVER_EIGEN
-
 #include <Eigen/Sparse>
 #include <Eigen/src/Core/util/DisableStupidWarnings.h>




More information about the Bf-blender-cvs mailing list