Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
d02633e9
Commit
d02633e9
authored
15 years ago
by
Laurent Van Migroet
Browse files
Options
Downloads
Patches
Plain Diff
Fix Bug compile on msvc + remove some warning
Change float to double in mpeg_encode/rgbtoycc.cpp ok ?
parent
98a92f25
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Numeric/Numeric.cpp
+11
-10
11 additions, 10 deletions
Numeric/Numeric.cpp
Solver/function.cpp
+5
-5
5 additions, 5 deletions
Solver/function.cpp
Solver/function.h
+2
-2
2 additions, 2 deletions
Solver/function.h
contrib/mpeg_encode/rgbtoycc.cpp
+6
-6
6 additions, 6 deletions
contrib/mpeg_encode/rgbtoycc.cpp
with
24 additions
and
23 deletions
Numeric/Numeric.cpp
+
11
−
10
View file @
d02633e9
...
...
@@ -831,13 +831,13 @@ void signedDistancesPointsTriangle(std::vector<double>&distances,
{
t1
.
z
(),
t2
.
z
(),
-
n
.
z
()}};
double
inv
[
3
][
3
];
double
det
=
inv3x3
(
mat
,
inv
);
const
unsigned
pts_size
=
pts
.
size
();
distances
.
clear
();
distances
.
resize
(
pts
.
size
()
);
distances
.
resize
(
pts
_
size
);
closePts
.
clear
();
closePts
.
resize
(
pts
.
size
()
);
closePts
.
resize
(
pts
_
size
);
for
(
unsigned
int
i
=
0
;
i
<
pts
.
size
()
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
pts
_
size
;
++
i
)
distances
[
i
]
=
1.e22
;
if
(
det
==
0.0
)
return
;
...
...
@@ -847,7 +847,7 @@ void signedDistancesPointsTriangle(std::vector<double>&distances,
const
double
n2t3
=
dot
(
t3
,
t3
);
double
u
,
v
,
d
;
for
(
unsigned
int
i
=
0
;
i
<
pts
.
size
();
i
++
){
for
(
unsigned
int
i
=
0
;
i
<
pts
_
size
;
++
i
){
const
SPoint3
&
p
=
pts
[
i
];
SVector3
pp1
=
p
-
p1
;
u
=
(
inv
[
0
][
0
]
*
pp1
.
x
()
+
inv
[
0
][
1
]
*
pp1
.
y
()
+
inv
[
0
][
2
]
*
pp1
.
z
());
...
...
@@ -910,13 +910,14 @@ void signedDistancesPointsLine (std::vector<double>&distances,
SVector3
t1
=
p2
-
p1
;
const
double
n2t1
=
dot
(
t1
,
t1
);
const
unsigned
pts_size
=
pts
.
size
();
distances
.
clear
();
distances
.
resize
(
pts
.
size
()
);
distances
.
resize
(
pts
_
size
);
closePts
.
clear
();
closePts
.
resize
(
pts
.
size
()
);
closePts
.
resize
(
pts
_
size
);
double
d
;
for
(
unsigned
int
i
=
0
;
i
<
pts
.
size
();
i
++
){
for
(
unsigned
int
i
=
0
;
i
<
pts
_
size
;
++
i
){
const
SPoint3
&
p
=
pts
[
i
];
SVector3
pp1
=
p
-
p1
;
const
double
t12
=
dot
(
pp1
,
t1
)
/
n2t1
;
...
...
This diff is collapsed.
Click to expand it.
Solver/function.cpp
+
5
−
5
View file @
d02633e9
...
...
@@ -32,12 +32,12 @@ void function::setArgument(fullMatrix<double> &v, const function *f, int iMap) {
throw
;
arguments
.
push_back
(
argument
(
v
,
iMap
,
f
));
dependencies
.
insert
(
dependency
(
iMap
,
f
));
for
(
std
::
set
<
dependency
>::
iterator
it
=
f
->
dependencies
.
begin
();
it
!=
f
->
dependencies
.
end
();
it
++
)
{
for
(
std
::
set
<
dependency
>::
const_
iterator
it
=
f
->
dependencies
.
begin
();
it
!=
f
->
dependencies
.
end
();
it
++
)
{
if
(
it
->
iMap
>
0
&&
iMap
>
0
)
Msg
::
Error
(
"consecutive secondary caches"
);
dependencies
.
insert
(
dependency
(
iMap
+
it
->
iMap
,
it
->
f
));
}
for
(
int
i
=
0
;
i
<
_functionReplaces
.
size
();
i
++
)
{
for
(
double
i
=
0
;
i
<
_functionReplaces
.
size
();
i
++
)
{
functionReplace
&
replace
=
*
_functionReplaces
[
i
];
for
(
std
::
set
<
dependency
>::
iterator
it
=
replace
.
_fromParent
.
begin
();
it
!=
replace
.
_fromParent
.
end
();
it
++
)
{
if
(
it
->
iMap
>
0
&&
iMap
>
0
)
...
...
@@ -80,7 +80,7 @@ dataCacheDouble &dataCacheMap::get(const function *f, dataCacheDouble *caller) {
// can I use the cache of my parent ?
if
(
_parent
&&
r
==
NULL
)
{
bool
okFromParent
=
true
;
for
(
std
::
set
<
function
::
dependency
>::
iterator
it
=
f
->
dependencies
.
begin
();
it
!=
f
->
dependencies
.
end
();
it
++
)
{
for
(
std
::
set
<
function
::
dependency
>::
const_
iterator
it
=
f
->
dependencies
.
begin
();
it
!=
f
->
dependencies
.
end
();
it
++
)
{
if
(
it
->
iMap
>
_parent
->
_secondaryCaches
.
size
())
okFromParent
=
false
;
dataCacheMap
*
m
=
getSecondaryCache
(
it
->
iMap
);
...
...
@@ -152,9 +152,9 @@ void functionReplace::replace(fullMatrix<double> &v, const function *f, int iMap
void
functionReplace
::
get
(
fullMatrix
<
double
>
&
v
,
const
function
*
f
,
int
iMap
)
{
bool
allDepFromParent
=
true
;
for
(
std
::
set
<
function
::
dependency
>::
iterator
itDep
=
f
->
dependencies
.
begin
();
itDep
!=
f
->
dependencies
.
end
();
itDep
++
){
for
(
std
::
set
<
function
::
dependency
>::
const_
iterator
itDep
=
f
->
dependencies
.
begin
();
itDep
!=
f
->
dependencies
.
end
();
itDep
++
){
bool
depFromParent
=
(
_replaced
.
count
(
*
itDep
)
==
0
);
for
(
std
::
set
<
function
::
dependency
>::
iterator
itDep2
=
itDep
->
f
->
dependencies
.
begin
();
itDep2
!=
itDep
->
f
->
dependencies
.
end
()
&&
depFromParent
;
itDep2
++
)
for
(
std
::
set
<
function
::
dependency
>::
const_
iterator
itDep2
=
itDep
->
f
->
dependencies
.
begin
();
itDep2
!=
itDep
->
f
->
dependencies
.
end
()
&&
depFromParent
;
itDep2
++
)
depFromParent
&=
(
_replaced
.
count
(
*
itDep2
)
==
0
);
if
(
depFromParent
)
_master
->
dependencies
.
insert
(
*
itDep
);
...
...
This diff is collapsed.
Click to expand it.
Solver/function.h
+
2
−
2
View file @
d02633e9
...
...
@@ -16,7 +16,7 @@ class dataCacheDouble;
class
functionConstant
;
class
functionReplace
;
class
functionReplaceCache
;
struct
functionReplaceCache
;
// An abstract interface to functions
// more explanation at the head of this file
...
...
@@ -26,7 +26,7 @@ class function {
bool
_invalidatedOnElement
;
std
::
vector
<
functionReplace
*>
_functionReplaces
;
class
dependency
{
public
:
int
iMap
;
const
function
*
f
;
public
:
unsigned
iMap
;
const
function
*
f
;
dependency
(
int
iMap_
,
const
function
*
f_
){
iMap
=
iMap_
;
f
=
f_
;
}
bool
operator
<
(
const
dependency
&
d
)
const
{
return
(
d
.
iMap
<
iMap
||
d
.
f
<
f
);
...
...
This diff is collapsed.
Click to expand it.
contrib/mpeg_encode/rgbtoycc.cpp
+
6
−
6
View file @
d02633e9
...
...
@@ -89,9 +89,9 @@ PNMtoYUV(MpegFrame *frame)
register
xel
*
src0
,
*
src1
;
register
int
ydivisor
,
cdivisor
;
static
boolean
first
=
TRUE
;
static
float
mult299
[
1024
],
mult587
[
1024
],
mult114
[
1024
];
static
float
mult16874
[
1024
],
mult33126
[
1024
],
mult5
[
1024
];
static
float
mult41869
[
1024
],
mult08131
[
1024
];
static
double
mult299
[
1024
],
mult587
[
1024
],
mult114
[
1024
];
static
double
mult16874
[
1024
],
mult33126
[
1024
],
mult5
[
1024
];
static
double
mult41869
[
1024
],
mult08131
[
1024
];
if
(
first
)
{
register
int
index
;
...
...
@@ -256,9 +256,9 @@ PPMtoYUV(MpegFrame *frame)
register
uint8
*
src0
,
*
src1
;
register
int
cdivisor
;
static
boolean
first
=
TRUE
;
static
float
mult299
[
1024
],
mult587
[
1024
],
mult114
[
1024
];
static
float
mult16874
[
1024
],
mult33126
[
1024
],
mult5
[
1024
];
static
float
mult41869
[
1024
],
mult08131
[
1024
];
static
double
mult299
[
1024
],
mult587
[
1024
],
mult114
[
1024
];
static
double
mult16874
[
1024
],
mult33126
[
1024
],
mult5
[
1024
];
static
double
mult41869
[
1024
],
mult08131
[
1024
];
if
(
first
)
{
register
int
index
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment