Last active
December 26, 2015 02:29
-
-
Save xatier/7078807 to your computer and use it in GitHub Desktop.
the slides for 10/21 meeting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Meeting II</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<style type="text/css" media="screen"> | |
/* Slideshow styles */ | |
@import url(http://fonts.googleapis.com/css?family=Droid+Serif); | |
@import url(http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); | |
body { | |
font-family: 'Droid Serif'; | |
font-size: 20px; | |
} | |
h1, h2, h3 { | |
font-family: 'Yanone Kaffeesatz'; | |
font-weight: 400; | |
margin-bottom: 0; | |
} | |
h1 { font-size: 4em; } | |
h2 { font-size: 2em; } | |
h3 { font-size: 1.6em; } | |
.footnote { | |
position: absolute; | |
bottom: 3em; | |
} | |
li p { line-height: 1.25em; } | |
.red { color: #fa0000; } | |
.large { font-size: 2em; } | |
a, a > code { | |
color: rgb(249, 38, 114); | |
text-decoration: none; | |
} | |
code { | |
-moz-border-radius: 5px; | |
-web-border-radius: 5px; | |
background: #e7e8e2; | |
border-radius: 5px; | |
font-size: 16px; | |
} | |
.pull-left { | |
float: left; | |
width: 47%; | |
} | |
.pull-right { | |
float: right; | |
width: 47%; | |
} | |
.pull-right ~ p { | |
clear: both; | |
} | |
#slideshow .slide .content code { | |
font-size: 0.8em; | |
} | |
#slideshow .slide .content pre code { | |
font-size: 0.9em; | |
padding: 15px; | |
} | |
.inverse { | |
background: #272822; | |
color: #777872; | |
text-shadow: 0 0 20px #333; | |
} | |
.inverse h1, .inverse h2 { | |
color: #f3f3f3; | |
line-height: 0.8em; | |
} | |
/* Slide-specific styling */ | |
#slide-inverse .footnote { | |
bottom: 12px; | |
left: 20px; | |
} | |
#slide-how .slides { | |
font-size: 0.9em; | |
position: absolute; | |
top: 151px; | |
right: 140px; | |
} | |
#slide-how .slides h3 { | |
margin-top: 0.2em; | |
} | |
#slide-how .slides .first, #slide-how .slides .second { | |
padding: 1px 20px; | |
height: 90px; | |
width: 120px; | |
-moz-box-shadow: 0 0 10px #777; | |
-webkit-box-shadow: 0 0 10px #777; | |
box-shadow: 0 0 10px #777; | |
} | |
#slide-how .slides .first { | |
background: #fff; | |
position: absolute; | |
top: 20%; | |
left: 20%; | |
z-index: 1; | |
} | |
#slide-how .slides .second { | |
position: relative; | |
background: #fff; | |
z-index: 0; | |
} | |
/* Two-column layout */ | |
.left-column { | |
color: #777; | |
width: 20%; | |
height: 92%; | |
float: left; | |
} | |
.left-column h2:last-of-type, .left-column h3:last-child { | |
color: #000; | |
} | |
.right-column { | |
width: 75%; | |
float: right; | |
padding-top: 2em; | |
} | |
</style> | |
</head> | |
<body> | |
<!-- slides start from here ---> | |
<textarea id="source"> | |
name: inverse | |
class: center, middle, inverse | |
Meeting II | |
======================= | |
##### Yan-Ming Li ##### | |
.footnote[Chap. 7, Chap. 8] | |
--- | |
Chap 7. OpenCL Numerical Compliance | |
---------------------------------- | |
- How OpenCL deal with floating point numbers? | |
--- | |
Rounding Modes | |
-------------- | |
- As defined in IEEE 754, we have 4 rounding modes: | |
+ round to nearest even (*) | |
+ round toward +INF | |
+ round toward -INF | |
+ round toward zero | |
--- | |
INF, NaN, Denormalized Numbers | |
----------------------------- | |
- INF and NaN must be supported | |
- Denormalized numbers is optional | |
--- | |
Floating-Point Exceptions | |
------------------------- | |
- disabled in OpenCL | |
- just follow the IEEE 754 spec (not enabled cases) | |
- floating-point flags and raising floating-point exceptions are implementation defined | |
--- | |
Relative Errors as ULPs | |
----------------------- | |
- ULP: units in the last place | |
If x is a real number that lies between two finite | |
consecutive floating-point numbers a and b, without being | |
equal to one of them, then ulp(x) = |b - a|, otherwise | |
ulp(x) is the distance between the two non-equal finite | |
floating-point numbers nearest x. Moreover, ulp(NaN) is | |
NaN, | |
--- | |
Edge case Behavior | |
------------------ | |
- NaN cases | |
- flush behavior | |
- rounding error | |
--- | |
Chap. 8 Image Addressing and Filtering | |
------------------------------ | |
- How to address the pixels? | |
--- | |
Image Coordinates | |
---------------------------------- | |
- Related to `read_image{f|i|ui}` | |
- Let `(s, t, r)` to be the width, height and depth of the image in pixels | |
+ `coord.xy -> (s, t)` | |
+ `coord.xyz -> (s, t, r)` | |
--- | |
Addressing and Filter Modes | |
---------------------------------- | |
- `CLK_FILTER_NEAREST` | |
- `CLK_FILTER_LINEAR` | |
--- | |
Conversion Rules | |
---------------------------------- | |
- Normalized integer data types -> floating point values | |
- Floating point values -> normalized integer data types | |
- half precision floating point data types | |
- sRGBA images | |
read_imgef | |
write_imagef | |
--- | |
Select an Image from an Image Array | |
---------------------------------- | |
- Let `(u,v,w)` represent the unnormalized image coordinate values for reading from / writing to a 2D image in a 2D image array. | |
layer = clamp(rint(w), 0, dt – 1) | |
- Let `(u,v)` represent the unnormalized image coordinate values for reading from / writing to a 1D image in a 1D image array. | |
layer = clamp(rint(v), 0, ht – 1) | |
--- | |
name: inverse | |
class: center, middle, inverse | |
Thanks | |
====== | |
</textarea> | |
<script src="http://gnab.github.io/remark/downloads/remark-0.6.0.min.js" type="text/javascript"> | |
</script> | |
<script type="text/javascript"> | |
var slideshow = remark.create({ | |
highlightStyle: 'arta', | |
highlightLanguage: 'bash' | |
}) ; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment