Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
b4bccbf5
Commit
b4bccbf5
authored
Aug 27, 2013
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compil visual 2010
parent
5cc5a623
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
26 deletions
+46
-26
ThirdParty/CMakeLists.txt
ThirdParty/CMakeLists.txt
+1
-0
ThirdParty/OpenNL/CMakeOptions.txt
ThirdParty/OpenNL/CMakeOptions.txt
+3
-2
ThirdParty/OpenNL/src/NL/nl_cholmod.c
ThirdParty/OpenNL/src/NL/nl_cholmod.c
+38
-20
include/Utils/textures.hpp
include/Utils/textures.hpp
+3
-3
src/Utils/svg.cpp
src/Utils/svg.cpp
+1
-1
No files found.
ThirdParty/CMakeLists.txt
View file @
b4bccbf5
...
...
@@ -17,6 +17,7 @@ ENDIF (${CMAKE_CURRENT_BINARY_DIR} MATCHES "(.*)Debug")
IF
(
WIN32
)
SET
(
LIBRARY_OUTPUT_PATH
${
CGoGN_ROOT_DIR
}
/lib
)
#release added by visual
INCLUDE_DIRECTORIES
(
${
CGoGN_ROOT_DIR
}
/windows_dependencies/include/
)
INCLUDE_DIRECTORIES
(
${
CGoGN_ROOT_DIR
}
/windows_dependencies/include/suitesparse
)
ELSE
(
WIN32
)
SET
(
LIBRARY_OUTPUT_PATH
${
CGoGN_ROOT_DIR
}
/lib/
${
CMAKE_BUILD_TYPE
}
)
ENDIF
(
WIN32
)
...
...
ThirdParty/OpenNL/CMakeOptions.txt
View file @
b4bccbf5
...
...
@@ -66,8 +66,9 @@ SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/OpenNL/CMakeModules)
# CHOLMOD
###########
SET(USE_CHOLMOD TRUE)
find_package(SuiteSparse REQUIRED)
IF (NOT WIN32)
find_package(SuiteSparse REQUIRED)
ENDIF (NOT WIN32)
###########
# CNC
###########
...
...
ThirdParty/OpenNL/src/NL/nl_cholmod.c
View file @
b4bccbf5
...
...
@@ -65,23 +65,34 @@ typedef struct {
NLboolean
nlFactorize_CHOLMOD
()
{
NLSparseMatrix
*
M
;
NLuint
n
;
NLuint
nnz
;
cholmod_sparse
*
cA
;
NLRowColumn
*
Ci
;
cholmod_context
*
context
;
NLuint
i
,
j
,
count
;
int
*
colptr
;
int
*
rowind
;
double
*
a
;
/* OpenNL Context */
NLSparseMatrix
*
M
=
&
(
nlCurrentContext
->
M
)
;
NLuint
n
=
nlCurrentContext
->
n
;
NLuint
nnz
=
nlSparseMatrixNNZ
(
M
)
;
/* Number of Non-Zero coeffs */
M
=
&
(
nlCurrentContext
->
M
)
;
n
=
nlCurrentContext
->
n
;
nnz
=
nlSparseMatrixNNZ
(
M
)
;
/* Number of Non-Zero coeffs */
c
holmod_context
*
c
ontext
=
(
cholmod_context
*
)(
nlCurrentContext
->
direct_solver_context
)
;
context
=
(
cholmod_context
*
)(
nlCurrentContext
->
direct_solver_context
)
;
if
(
context
==
NULL
)
{
nlCurrentContext
->
direct_solver_context
=
malloc
(
sizeof
(
cholmod_context
))
;
context
=
(
cholmod_context
*
)(
nlCurrentContext
->
direct_solver_context
)
;
}
/* CHOLMOD variables */
c
holmod_sparse
*
c
A
=
NULL
;
cA
=
NULL
;
/* Temporary variables */
NLRowColumn
*
Ci
=
NULL
;
NLuint
i
,
j
,
count
;
Ci
=
NULL
;
/* Sanity checks */
nl_assert
(
M
->
storage
&
NL_MATRIX_STORE_COLUMNS
)
;
...
...
@@ -95,9 +106,9 @@ NLboolean nlFactorize_CHOLMOD() {
*/
cA
=
cholmod_allocate_sparse
(
n
,
n
,
nnz
,
NL_FALSE
,
NL_TRUE
,
-
1
,
CHOLMOD_REAL
,
&
(
context
->
c
))
;
int
*
colptr
=
(
int
*
)(
cA
->
p
)
;
int
*
rowind
=
(
int
*
)(
cA
->
i
)
;
double
*
a
=
(
double
*
)(
cA
->
x
)
;
colptr
=
(
int
*
)(
cA
->
p
)
;
rowind
=
(
int
*
)(
cA
->
i
)
;
a
=
(
double
*
)(
cA
->
x
)
;
count
=
0
;
for
(
i
=
0
;
i
<
n
;
i
++
)
{
...
...
@@ -134,26 +145,33 @@ NLboolean nlFactorize_CHOLMOD() {
NLboolean
nlSolve_CHOLMOD
()
{
cholmod_dense
*
cx
;
NLuint
i
;
NLdouble
*
b
;
NLdouble
*
x
;
NLuint
n
;
/* Temporary variables */
double
*
cbx
;
double
*
cxx
;
cholmod_context
*
context
;
/* OpenNL Context */
NLdouble
*
b
=
nlCurrentContext
->
b
;
NLdouble
*
x
=
nlCurrentContext
->
x
;
NLuint
n
=
nlCurrentContext
->
n
;
b
=
nlCurrentContext
->
b
;
x
=
nlCurrentContext
->
x
;
n
=
nlCurrentContext
->
n
;
c
holmod_context
*
c
ontext
=
(
cholmod_context
*
)(
nlCurrentContext
->
direct_solver_context
)
;
context
=
(
cholmod_context
*
)(
nlCurrentContext
->
direct_solver_context
)
;
nl_assert
(
context
!=
NULL
)
;
/* CHOLMOD variables */
cholmod_dense
*
cx
=
NULL
;
/* Temporary variables */
NLuint
i
;
cx
=
NULL
;
/*
* Step 1: convert right-hand side into CHOLMOD representation
* -----------------------------------------------------------
*/
double
*
cbx
=
(
double
*
)(
context
->
cb
->
x
)
;
cbx
=
(
double
*
)(
context
->
cb
->
x
)
;
for
(
i
=
0
;
i
<
n
;
i
++
)
cbx
[
i
]
=
b
[
i
]
;
...
...
@@ -169,7 +187,7 @@ NLboolean nlSolve_CHOLMOD() {
* ------------------------
*/
double
*
cxx
=
(
double
*
)(
cx
->
x
)
;
cxx
=
(
double
*
)(
cx
->
x
)
;
for
(
i
=
0
;
i
<
n
;
i
++
)
x
[
i
]
=
cxx
[
i
]
;
...
...
include/Utils/textures.hpp
View file @
b4bccbf5
...
...
@@ -546,7 +546,7 @@ Image<DIM,TYPE>* Image<DIM,TYPE>::scaleNearestToNewImage(const COORD& newSize)
double
p0
=
inc0
/
2.0
-
0.5
;
for
(
unsigned
int
i
=
0
;
i
<
newSize
[
0
];
++
i
)
{
newImg
->
texel
(
i
)
=
this
->
texel
(
(
unsigned
int
)(
rint
(
p0
)
)
);
newImg
->
texel
(
i
)
=
this
->
texel
(
(
unsigned
int
)(
p0
+
0.5
)
);
p0
+=
inc0
;
}
}
...
...
@@ -561,7 +561,7 @@ Image<DIM,TYPE>* Image<DIM,TYPE>::scaleNearestToNewImage(const COORD& newSize)
double
p0
=
inc0
/
2.0
-
0.5
;
for
(
unsigned
int
i
=
0
;
i
<
newSize
[
0
];
++
i
)
{
newImg
->
texel
(
i
,
j
)
=
this
->
texel
(
(
unsigned
int
)(
rint
(
p0
)),
(
unsigned
int
)(
rint
(
p1
)
)
);
newImg
->
texel
(
i
,
j
)
=
this
->
texel
(
(
unsigned
int
)(
p0
+
0.5
),
(
unsigned
int
)(
p1
+
0.5
)
);
p0
+=
inc0
;
}
p1
+=
inc1
;
...
...
@@ -582,7 +582,7 @@ Image<DIM,TYPE>* Image<DIM,TYPE>::scaleNearestToNewImage(const COORD& newSize)
double
p0
=
inc0
/
2.0
-
0.5
;
for
(
unsigned
int
i
=
0
;
i
<
newSize
[
0
];
++
i
)
{
newImg
->
texel
(
i
,
j
,
k
)
=
this
->
texel
(
(
unsigned
int
)(
rint
(
p0
)),
(
unsigned
int
)(
rint
(
p1
)),
(
unsigned
int
)(
rint
(
p2
)
)
);
newImg
->
texel
(
i
,
j
,
k
)
=
this
->
texel
(
(
unsigned
int
)(
p0
+
0.5
),
(
unsigned
int
)(
p1
+
0.5
),
(
unsigned
int
)(
p2
+
0.5
)
);
p0
+=
inc0
;
}
p1
+=
inc1
;
...
...
src/Utils/svg.cpp
View file @
b4bccbf5
...
...
@@ -707,7 +707,7 @@ void SVGOut::write()
{
if
(
m_attFact
>
0.0
f
)
{
float
da
=
float
(
pow
(
double
(
itd
-
vds
.
begin
()),
m_attFact
)
/
pow
(
double
(
vds
.
size
()),
m_attFact
));
float
da
=
float
(
pow
(
double
(
itd
-
vds
.
begin
()),
double
(
m_attFact
))
/
pow
(
double
(
vds
.
size
()),
double
(
m_attFact
)
));
(
*
it
)
->
m_objs
[
itd
->
obj
]
->
saveOneDepthAttenuation
(
*
m_out
,
da
,
itd
->
id
,
m_bbX1
-
m_bbX0
);
}
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment