Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
6a56aad0
Commit
6a56aad0
authored
Nov 11, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A minor change to avoid a compiler error when not using SSE instructions.
parent
a29472ab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
simd4f.h
dlib/simd/simd4f.h
+9
-4
simd4i.h
dlib/simd/simd4i.h
+7
-0
No files found.
dlib/simd/simd4f.h
View file @
6a56aad0
...
...
@@ -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
];}
// truncate to 32bit integers
operator
simd4i
()
const
{
return
simd4i
((
int32
)
x
[
0
],
(
int32
)
x
[
1
],
(
int32
)
x
[
2
],
(
int32
)
x
[
3
]);
}
operator
simd4i
::
rawarray
()
const
{
simd4i
::
rawarray
temp
;
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
)
{
...
...
dlib/simd/simd4i.h
View file @
6a56aad0
...
...
@@ -45,6 +45,7 @@ namespace dlib
__m128i
x
;
};
#else
class
simd4i
{
public
:
...
...
@@ -54,6 +55,12 @@ namespace dlib
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
;}
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
)
{
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