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
6bf6c5f9
Commit
6bf6c5f9
authored
Nov 09, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added conversions from simd4f to simd4i.
parent
ca5eeb80
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
simd4f.h
dlib/simd/simd4f.h
+9
-0
No files found.
dlib/simd/simd4f.h
View file @
6bf6c5f9
...
...
@@ -31,6 +31,9 @@ namespace dlib
operator
__m128
()
const
{
return
x
;
}
// truncate to 32bit integers
operator
__m128i
()
const
{
return
_mm_cvttps_epi32
(
x
);
}
void
load_aligned
(
const
type
*
ptr
)
{
x
=
_mm_load_ps
(
ptr
);
}
void
store_aligned
(
type
*
ptr
)
const
{
_mm_store_ps
(
ptr
,
x
);
}
void
load
(
const
type
*
ptr
)
{
x
=
_mm_loadu_ps
(
ptr
);
}
...
...
@@ -79,6 +82,12 @@ namespace dlib
simd4f
(
float
r0
,
float
r1
,
float
r2
,
float
r3
)
{
x
[
0
]
=
r0
;
x
[
1
]
=
r1
;
x
[
2
]
=
r2
;
x
[
3
]
=
r3
;}
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
]);
}
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