Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
6a56aad0
Commit
6a56aad0
authored
Nov 10, 2013
by
Davis King
Browse files
A minor change to avoid a compiler error when not using SSE instructions.
parent
a29472ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
dlib/simd/simd4f.h
dlib/simd/simd4f.h
+9
-4
dlib/simd/simd4i.h
dlib/simd/simd4i.h
+7
-0
No files found.
dlib/simd/simd4f.h
View file @
6a56aad0
...
@@ -83,10 +83,15 @@ namespace dlib
...
@@ -83,10 +83,15 @@ namespace dlib
simd4f
(
const
simd4i
&
val
)
{
x
[
0
]
=
val
[
0
];
x
[
1
]
=
val
[
1
];
x
[
2
]
=
val
[
2
];
x
[
3
]
=
val
[
3
];}
simd4f
(
const
simd4i
&
val
)
{
x
[
0
]
=
val
[
0
];
x
[
1
]
=
val
[
1
];
x
[
2
]
=
val
[
2
];
x
[
3
]
=
val
[
3
];}
// truncate to 32bit integers
// truncate to 32bit integers
operator
simd4i
()
const
{
return
simd4i
((
int32
)
x
[
0
],
operator
simd4i
::
rawarray
()
const
(
int32
)
x
[
1
],
{
(
int32
)
x
[
2
],
simd4i
::
rawarray
temp
;
(
int32
)
x
[
3
]);
}
temp
.
a
[
0
]
=
(
int32
)
x
[
0
];
temp
.
a
[
1
]
=
(
int32
)
x
[
1
];
temp
.
a
[
2
]
=
(
int32
)
x
[
2
];
temp
.
a
[
3
]
=
(
int32
)
x
[
3
];
return
temp
;
}
void
load_aligned
(
const
type
*
ptr
)
void
load_aligned
(
const
type
*
ptr
)
{
{
...
...
dlib/simd/simd4i.h
View file @
6a56aad0
...
@@ -45,6 +45,7 @@ namespace dlib
...
@@ -45,6 +45,7 @@ namespace dlib
__m128i
x
;
__m128i
x
;
};
};
#else
#else
class
simd4i
class
simd4i
{
{
public:
public:
...
@@ -54,6 +55,12 @@ namespace dlib
...
@@ -54,6 +55,12 @@ namespace dlib
simd4i
(
int32
f
)
{
x
[
0
]
=
f
;
x
[
1
]
=
f
;
x
[
2
]
=
f
;
x
[
3
]
=
f
;
}
simd4i
(
int32
f
)
{
x
[
0
]
=
f
;
x
[
1
]
=
f
;
x
[
2
]
=
f
;
x
[
3
]
=
f
;
}
simd4i
(
int32
r0
,
int32
r1
,
int32
r2
,
int32
r3
)
{
x
[
0
]
=
r0
;
x
[
1
]
=
r1
;
x
[
2
]
=
r2
;
x
[
3
]
=
r3
;}
simd4i
(
int32
r0
,
int32
r1
,
int32
r2
,
int32
r3
)
{
x
[
0
]
=
r0
;
x
[
1
]
=
r1
;
x
[
2
]
=
r2
;
x
[
3
]
=
r3
;}
struct
rawarray
{
int32
a
[
4
];
};
simd4i
(
const
rawarray
&
a
)
{
x
[
0
]
=
a
.
a
[
0
];
x
[
1
]
=
a
.
a
[
1
];
x
[
2
]
=
a
.
a
[
2
];
x
[
3
]
=
a
.
a
[
3
];
}
void
load_aligned
(
const
type
*
ptr
)
void
load_aligned
(
const
type
*
ptr
)
{
{
x
[
0
]
=
ptr
[
0
];
x
[
0
]
=
ptr
[
0
];
...
...
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