Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
angle
Project
Overview
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
Chen Yisong
angle
Commits
bef72cee
Commit
bef72cee
authored
Oct 23, 2012
by
apatrick@chromium.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Float16ToFloat32.py. Issue #376.
Review URL:
https://codereview.appspot.com/6651047
git-svn-id:
https://angleproject.googlecode.com/svn/trunk@1320
736b8ea6-26fd-11df-bfd4-992fa37f6226
parent
778cd1ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Float16ToFloat32.py
src/libGLESv2/Float16ToFloat32.py
+4
-4
No files found.
src/libGLESv2/Float16ToFloat32.py
View file @
bef72cee
...
...
@@ -56,22 +56,22 @@ namespace gl
print
"const static unsigned g_mantissa[2048] = {"
for
i
in
range
(
0
,
2048
):
print
"
%
08
x,"
%
convertMantissa
(
i
)
print
"
%
#010
x,"
%
convertMantissa
(
i
)
print
"};
\n
"
print
"const static unsigned g_exponent[64] = {"
for
i
in
range
(
0
,
64
):
print
"
%
08
x,"
%
convertExponent
(
i
)
print
"
%
#010
x,"
%
convertExponent
(
i
)
print
"};
\n
"
print
"const static unsigned g_offset[64] = {"
for
i
in
range
(
0
,
64
):
print
"
%
08
x,"
%
convertOffset
(
i
)
print
"
%
#010
x,"
%
convertOffset
(
i
)
print
"};
\n
"
print
"""float float16ToFloat32(unsigned short h)
{
unsigned i32 =
=
g_mantissa[g_offset[h >> 10] + (h & 0x3ff)] + g_exponent[h >> 10];
unsigned i32 = g_mantissa[g_offset[h >> 10] + (h & 0x3ff)] + g_exponent[h >> 10];
return *(float*) &i32;
}
}
...
...
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