Compare commits
2 Commits
a892100308
...
bda49a20c9
| Author | SHA1 | Date | |
|---|---|---|---|
| bda49a20c9 | |||
| 09ee32383f |
@@ -87,7 +87,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">4.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">3.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -106,7 +106,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:10%" class="tablecell_success">14</td>
|
||||
<td style="width:10%" class="tablecell_success">0</td>
|
||||
<td style="width:10%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">4.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">3.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -189,7 +189,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td class="tablecell_success">testMonoBlock</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">3.000000</td>
|
||||
<td class="tablecell_success">2.000000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tablecell_success">testMonoThread</td>
|
||||
|
||||
@@ -87,7 +87,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:30%" class="tablecell_success">1</td>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">11.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">10.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -106,7 +106,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:10%" class="tablecell_success">1</td>
|
||||
<td style="width:10%" class="tablecell_success">0</td>
|
||||
<td style="width:10%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">11.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">10.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -123,7 +123,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td class="tablecell_success">performanceOnly</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">11.000000</td>
|
||||
<td class="tablecell_success">10.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="spaced"><a href="#top">Back to top</a>
|
||||
|
||||
@@ -153,7 +153,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td class="tablecell_success">testDB64</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">0.000000</td>
|
||||
<td class="tablecell_success">1.000000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tablecell_success">testDB128</td>
|
||||
@@ -183,7 +183,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td class="tablecell_success">testGrid</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">1.000000</td>
|
||||
<td class="tablecell_success">0.000000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tablecell_success">testMonoBlock</td>
|
||||
|
||||
@@ -87,7 +87,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:30%" class="tablecell_success">1</td>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">10.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">11.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -106,7 +106,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:10%" class="tablecell_success">1</td>
|
||||
<td style="width:10%" class="tablecell_success">0</td>
|
||||
<td style="width:10%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">10.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">11.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -123,7 +123,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td class="tablecell_success">performanceOnly</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">10.000000</td>
|
||||
<td class="tablecell_success">11.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="spaced"><a href="#top">Back to top</a>
|
||||
|
||||
@@ -87,7 +87,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">1.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">0.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -106,7 +106,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:10%" class="tablecell_success">13</td>
|
||||
<td style="width:10%" class="tablecell_success">0</td>
|
||||
<td style="width:10%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">1.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">0.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -183,7 +183,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td class="tablecell_success">testGrid</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">1.000000</td>
|
||||
<td class="tablecell_success">0.000000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tablecell_success">testMonoBlock</td>
|
||||
|
||||
@@ -87,7 +87,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:30%" class="tablecell_success">1</td>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">8.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">11.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -106,7 +106,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:10%" class="tablecell_success">1</td>
|
||||
<td style="width:10%" class="tablecell_success">0</td>
|
||||
<td style="width:10%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">8.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">11.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -123,7 +123,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td class="tablecell_success">performanceOnly</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">8.000000</td>
|
||||
<td class="tablecell_success">11.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="spaced"><a href="#top">Back to top</a>
|
||||
|
||||
@@ -53,13 +53,13 @@ int mainTest()
|
||||
* activer ci-dessous la version souhaiter
|
||||
*/
|
||||
void slice() {
|
||||
// VTSliceGMHOST test1;
|
||||
// VTSliceGM test2;
|
||||
VTSliceGMHOST test1;
|
||||
VTSliceGM test2;
|
||||
VTSliceSM test3;
|
||||
|
||||
|
||||
// test1.run();
|
||||
// test2.run();
|
||||
test1.run();
|
||||
test2.run();
|
||||
test3.run();
|
||||
}
|
||||
|
||||
|
||||
@@ -66,12 +66,12 @@ int mainUse()
|
||||
*/
|
||||
void slice(bool& isOk)
|
||||
{
|
||||
// SliceGmHostUse sliceGmHostUse(IS_VERBOSE);
|
||||
// SliceGmUse sliceGmUse(IS_VERBOSE);
|
||||
SliceGmHostUse sliceGmHostUse(IS_VERBOSE);
|
||||
SliceGmUse sliceGmUse(IS_VERBOSE);
|
||||
SliceSmUse sliceSmUse(IS_VERBOSE);
|
||||
|
||||
// isOk &= sliceGmHostUse.isOk(IS_VERBOSE);
|
||||
// isOk &= sliceGmUse.isOk(IS_VERBOSE);
|
||||
isOk &= sliceGmHostUse.isOk(IS_VERBOSE);
|
||||
isOk &= sliceGmUse.isOk(IS_VERBOSE);
|
||||
isOk &= sliceSmUse.isOk(IS_VERBOSE);
|
||||
}
|
||||
|
||||
|
||||
140
Student_Cuda_Image/out/Mandelbrot_fp16_justesse.html
Normal file
140
Student_Cuda_Image/out/Mandelbrot_fp16_justesse.html
Normal file
@@ -0,0 +1,140 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="CppTest - https://github.com/cpptest/cpptest" />
|
||||
|
||||
<title>Mandelbrot_fp16_justesse </title>
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
<!--
|
||||
hr {
|
||||
width: 100%;
|
||||
border-width: 0px;
|
||||
height: 1px;
|
||||
color: #cccccc;
|
||||
background-color: #cccccc;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
table {
|
||||
width:100%;
|
||||
border-collapse:separate;
|
||||
border-spacing: 2px;
|
||||
border:0px;
|
||||
}
|
||||
tr {
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
td {
|
||||
margin:0px;
|
||||
padding:1px;
|
||||
}
|
||||
.table_summary {
|
||||
}
|
||||
.table_suites {
|
||||
}
|
||||
.table_suite {
|
||||
}
|
||||
.table_result {
|
||||
margin: 0px 0px 1em 0px;
|
||||
}
|
||||
.tablecell_title {
|
||||
background-color: #a5cef7;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tablecell_success {
|
||||
background-color: #efefe7;
|
||||
}
|
||||
|
||||
.tablecell_error {
|
||||
color: #ff0808;
|
||||
background-color: #efefe7;
|
||||
font-weight: bold;
|
||||
}
|
||||
p.spaced {
|
||||
margin: 0px;
|
||||
padding: 1em 0px 2em 0px;
|
||||
}
|
||||
p.unspaced {
|
||||
margin: 0px;
|
||||
padding: 0px 0px 2em 0px;
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1><a name="top"></a>Mandelbrot_fp16_justesse </h1>
|
||||
|
||||
<div style="text-align:right">
|
||||
Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<h2>Summary</h2>
|
||||
<table summary="Summary of test results" class="table_summary">
|
||||
<tr>
|
||||
<td style="width:30%" class="tablecell_title">Tests</td>
|
||||
<td style="width:30%" class="tablecell_title">Errors</td>
|
||||
<td style="width:30%" class="tablecell_title">Success</td>
|
||||
<td style="width:10%" class="tablecell_title">Time (s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:30%" class="tablecell_success">1</td>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">2.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
|
||||
<h2>Test suites</h2>
|
||||
<table summary="Test Suites" class="table_suites">
|
||||
<tr>
|
||||
<td class="tablecell_title">Name</td>
|
||||
<td style="width:10%" class="tablecell_title">Tests</td>
|
||||
<td style="width:10%" class="tablecell_title">Errors</td>
|
||||
<td style="width:10%" class="tablecell_title">Success</td>
|
||||
<td style="width:10%" class="tablecell_title">Time (s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tablecell_success"><a href="#TestImageCuda">TestImageCuda</a></td>
|
||||
<td style="width:10%" class="tablecell_success">1</td>
|
||||
<td style="width:10%" class="tablecell_success">0</td>
|
||||
<td style="width:10%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">2.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
|
||||
<h3><a name="TestImageCuda"></a>Suite: TestImageCuda</h3>
|
||||
<table summary="Details for suite TestImageCuda" class="table_suite">
|
||||
<tr>
|
||||
<td class="tablecell_title">Name</td>
|
||||
<td style="width:10%" class="tablecell_title">Errors</td>
|
||||
<td style="width:10%" class="tablecell_title">Success</td>
|
||||
<td style="width:10%" class="tablecell_title">Time (s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tablecell_success">allTests</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">2.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="spaced"><a href="#top">Back to top</a>
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
||||
<p>
|
||||
<a href="http://validator.w3.org/#validate-by-upload">
|
||||
Valid XHTML 1.0 Strict
|
||||
</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
140
Student_Cuda_Image/out/Mandelbrot_fp16_performance.html
Normal file
140
Student_Cuda_Image/out/Mandelbrot_fp16_performance.html
Normal file
@@ -0,0 +1,140 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="CppTest - https://github.com/cpptest/cpptest" />
|
||||
|
||||
<title>Mandelbrot_fp16_performance </title>
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
<!--
|
||||
hr {
|
||||
width: 100%;
|
||||
border-width: 0px;
|
||||
height: 1px;
|
||||
color: #cccccc;
|
||||
background-color: #cccccc;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
table {
|
||||
width:100%;
|
||||
border-collapse:separate;
|
||||
border-spacing: 2px;
|
||||
border:0px;
|
||||
}
|
||||
tr {
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
td {
|
||||
margin:0px;
|
||||
padding:1px;
|
||||
}
|
||||
.table_summary {
|
||||
}
|
||||
.table_suites {
|
||||
}
|
||||
.table_suite {
|
||||
}
|
||||
.table_result {
|
||||
margin: 0px 0px 1em 0px;
|
||||
}
|
||||
.tablecell_title {
|
||||
background-color: #a5cef7;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tablecell_success {
|
||||
background-color: #efefe7;
|
||||
}
|
||||
|
||||
.tablecell_error {
|
||||
color: #ff0808;
|
||||
background-color: #efefe7;
|
||||
font-weight: bold;
|
||||
}
|
||||
p.spaced {
|
||||
margin: 0px;
|
||||
padding: 1em 0px 2em 0px;
|
||||
}
|
||||
p.unspaced {
|
||||
margin: 0px;
|
||||
padding: 0px 0px 2em 0px;
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1><a name="top"></a>Mandelbrot_fp16_performance </h1>
|
||||
|
||||
<div style="text-align:right">
|
||||
Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<h2>Summary</h2>
|
||||
<table summary="Summary of test results" class="table_summary">
|
||||
<tr>
|
||||
<td style="width:30%" class="tablecell_title">Tests</td>
|
||||
<td style="width:30%" class="tablecell_title">Errors</td>
|
||||
<td style="width:30%" class="tablecell_title">Success</td>
|
||||
<td style="width:10%" class="tablecell_title">Time (s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:30%" class="tablecell_success">1</td>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">12.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
|
||||
<h2>Test suites</h2>
|
||||
<table summary="Test Suites" class="table_suites">
|
||||
<tr>
|
||||
<td class="tablecell_title">Name</td>
|
||||
<td style="width:10%" class="tablecell_title">Tests</td>
|
||||
<td style="width:10%" class="tablecell_title">Errors</td>
|
||||
<td style="width:10%" class="tablecell_title">Success</td>
|
||||
<td style="width:10%" class="tablecell_title">Time (s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tablecell_success"><a href="#TestPerformance_RunnableGPU_A">TestPerformance_RunnableGPU_A</a></td>
|
||||
<td style="width:10%" class="tablecell_success">1</td>
|
||||
<td style="width:10%" class="tablecell_success">0</td>
|
||||
<td style="width:10%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">12.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
|
||||
<h3><a name="TestPerformance_RunnableGPU_A"></a>Suite: TestPerformance_RunnableGPU_A</h3>
|
||||
<table summary="Details for suite TestPerformance_RunnableGPU_A" class="table_suite">
|
||||
<tr>
|
||||
<td class="tablecell_title">Name</td>
|
||||
<td style="width:10%" class="tablecell_title">Errors</td>
|
||||
<td style="width:10%" class="tablecell_title">Success</td>
|
||||
<td style="width:10%" class="tablecell_title">Time (s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tablecell_success">performanceOnly</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">12.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="spaced"><a href="#top">Back to top</a>
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
||||
<p>
|
||||
<a href="http://validator.w3.org/#validate-by-upload">
|
||||
Valid XHTML 1.0 Strict
|
||||
</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -87,7 +87,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:30%" class="tablecell_success">1</td>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">8.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">16.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -106,7 +106,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:10%" class="tablecell_success">1</td>
|
||||
<td style="width:10%" class="tablecell_success">0</td>
|
||||
<td style="width:10%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">8.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">16.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -123,7 +123,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td class="tablecell_success">performanceOnly</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">8.000000</td>
|
||||
<td class="tablecell_success">16.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="spaced"><a href="#top">Back to top</a>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024
|
||||
64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024
|
||||
64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024
|
||||
64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024
|
||||
64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024
|
||||
64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024
|
||||
64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024
|
||||
64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024
|
||||
64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024
|
||||
64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024
|
||||
|
@@ -0,0 +1,10 @@
|
||||
68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68
|
||||
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136
|
||||
204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204
|
||||
272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272
|
||||
340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340
|
||||
408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408
|
||||
476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476
|
||||
544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544
|
||||
612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612
|
||||
680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680
|
||||
|
@@ -0,0 +1,10 @@
|
||||
11261,21977,27704,28654,28277,28547,28629,28404,28310,28099,28086,28083,27716,27519,27791,28011
|
||||
19038,28186,28672,29112,28426,28273,28146,28144,27978,27624,27759,27741,27325,27066,27341,27544
|
||||
27172,28378,27808,28260,28006,28038,27917,27990,27496,27172,27343,27313,26925,26740,26918,27046
|
||||
27677,28301,27408,28080,27452,27837,27162,27780,27046,26611,26934,26825,26609,26218,26593,26529
|
||||
27585,27504,27616,27705,27863,27826,27102,27073,26633,26380,26509,26507,26361,25949,26339,26248
|
||||
26661,27570,27783,28103,27632,27613,27589,27606,26069,25936,26088,26036,26011,25575,25894,25830
|
||||
27632,27463,27391,27489,27242,27606,27584,26880,25818,25521,25840,25693,25640,25316,25482,25309
|
||||
27657,27392,27302,27627,27038,27244,26594,27163,25196,24997,25035,25023,24712,24685,24668,24540
|
||||
25842,24673,26280,26057,26492,25605,26130,25341,24431,23305,24874,23801,24877,23471,24577,23293
|
||||
23284,25709,25062,26164,25511,27316,25176,24768,23921,22530,23529,22545,23692,22471,24333,22815
|
||||
|
@@ -18,15 +18,15 @@ namespace rippling {
|
||||
public:
|
||||
|
||||
static Grid get() {
|
||||
const int MP = Hardware::getMPCount();
|
||||
const int CORE_MP = Hardware::getCoreCountMP();
|
||||
const int MP = Hardware::getMPCount();
|
||||
const int CORE_MP = Hardware::getCoreCountMP();
|
||||
|
||||
// TODO Rippling
|
||||
dim3 dg(MP, 1, 1);
|
||||
dim3 db(CORE_MP, 4, 1);
|
||||
Grid grid(dg, db);
|
||||
// TODO Rippling
|
||||
dim3 dg(MP, 1, 1);
|
||||
dim3 db(CORE_MP, 4, 1);
|
||||
Grid grid(dg, db);
|
||||
|
||||
return grid;
|
||||
return grid;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -20,19 +20,36 @@ static __device__ void color(uchar4* ptrColor,int k, int n);
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
__global__ void mandelbrot(uchar4* tabPixelsGM , uint w , uint h , DomaineMath domaineMath , int n)
|
||||
{
|
||||
__global__
|
||||
void mandelbrot(uchar4* tabPixelsGM , uint w , uint h , DomaineMath domaineMath , int n) {
|
||||
// TODO Mandelbrot :
|
||||
//
|
||||
// entrelacement
|
||||
// s -> (i,j) -> (x,y)
|
||||
// appeler colorXY
|
||||
|
||||
double x;
|
||||
double y;
|
||||
double x = 0;
|
||||
double y = 0;
|
||||
|
||||
const int TID = Thread2D::tid();
|
||||
const int NB_THREAD = Thread2D::nbThread();
|
||||
const int WH = w * h;
|
||||
|
||||
MandelbrotMath mm(n);
|
||||
|
||||
int s = TID;
|
||||
|
||||
while ( s < WH) {
|
||||
int i = s / w;
|
||||
int j = s % w;
|
||||
domaineMath.toXY(i, j, &x, &y);
|
||||
mm.colorXY(&tabPixelsGM[s], (real)x, (real)y);
|
||||
s += NB_THREAD;
|
||||
}
|
||||
|
||||
//domaineMath.toXY(i, j, &x, &y); // x et y doivent etre en double! Caster ensuite en real lors du passage à colorXY
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* private *|
|
||||
@@ -42,8 +59,8 @@ __global__ void mandelbrot(uchar4* tabPixelsGM , uint w , uint h , DomaineMath d
|
||||
* optimisation lookup table color (facultatif)
|
||||
*/
|
||||
__inline__
|
||||
__device__ void fill(uchar4* tabSM,int n)
|
||||
{
|
||||
__device__
|
||||
void fill(uchar4* tabSM,int n) {
|
||||
// Indications:
|
||||
// (I1) tabSM a n cases
|
||||
// (I2) La case k contient les couleurs en RVBA lorsque la suite s est arreter a k
|
||||
@@ -54,18 +71,17 @@ __device__ void fill(uchar4* tabSM,int n)
|
||||
// Warning
|
||||
// (W1) Commencer d'abord sans cette piste d'optimisation
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* optimisation lookup table color (facultatif)
|
||||
*/
|
||||
__inline__
|
||||
__device__ void color(uchar4* ptrColor,int k, int n)
|
||||
{
|
||||
__device__
|
||||
void color(uchar4* ptrColor,int k, int n) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -33,25 +33,24 @@ using mandelbrotReal::real;
|
||||
#define ZERO 0.0
|
||||
#endif
|
||||
|
||||
class MandelbrotMath
|
||||
{
|
||||
class MandelbrotMath {
|
||||
/*--------------------------------------*\
|
||||
|* Constructeur *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
public:
|
||||
|
||||
__device__ MandelbrotMath(int n) : //
|
||||
n(n)
|
||||
{
|
||||
__device__
|
||||
MandelbrotMath(int n) : //
|
||||
n(n) {
|
||||
// rien
|
||||
}
|
||||
}
|
||||
|
||||
__device__
|
||||
virtual ~MandelbrotMath()
|
||||
{
|
||||
virtual
|
||||
~MandelbrotMath() {
|
||||
// rien
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Methode *|
|
||||
@@ -60,8 +59,7 @@ class MandelbrotMath
|
||||
public:
|
||||
|
||||
__device__
|
||||
void colorXY(uchar4* ptrColorIJ , real x , real y)
|
||||
{
|
||||
void colorXY(uchar4* ptrColorIJ , real x , real y) {
|
||||
// TODO Mandelbrot
|
||||
|
||||
// Calculer la suite en (x,y) et recuperer l'indice d'arret de la suite
|
||||
@@ -75,12 +73,30 @@ class MandelbrotMath
|
||||
// Etape 2: Puis une fois que l'image grise est valider, attaquer montecarlo
|
||||
|
||||
// debug temp
|
||||
// {
|
||||
// ptrColorIJ->x = 128;
|
||||
// ptrColorIJ->y = 128;
|
||||
// ptrColorIJ->z = 128;
|
||||
// ptrColorIJ->w = 255; // opacity facultatif
|
||||
}
|
||||
// {
|
||||
// ptrColorIJ->x = 128;
|
||||
// ptrColorIJ->y = 128;
|
||||
// ptrColorIJ->z = 128;
|
||||
// ptrColorIJ->w = 255; // opacity facultatif
|
||||
// }
|
||||
|
||||
int itr = suite(x, y);
|
||||
|
||||
if (itr >= n) {
|
||||
ptrColorIJ->x = 0;
|
||||
ptrColorIJ->y = 0;
|
||||
ptrColorIJ->z = 0;
|
||||
ptrColorIJ->w = 255; // opacity facultatif
|
||||
} else {
|
||||
Colors::HSB_TO_RVB(
|
||||
( (float)itr ) / ( (float)(this->n-1) ),
|
||||
1.f,
|
||||
1.f,
|
||||
ptrColorIJ
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -90,20 +106,35 @@ class MandelbrotMath
|
||||
*/
|
||||
__inline__
|
||||
__device__
|
||||
int suite(real x , real y)
|
||||
{ // TODO Mandelbrot
|
||||
int suite(real x , real y) { // TODO Mandelbrot
|
||||
|
||||
// Utiliser dans vos formules les variable :
|
||||
//
|
||||
// DEUX
|
||||
// QUATRE
|
||||
// ZERO
|
||||
//
|
||||
// definit au debut de ce fichier. Est-utile pour passer facilement d'une version fp64 (double) fp32(float) fp16(half)
|
||||
// Utiliser dans vos formules les variable :
|
||||
//
|
||||
// DEUX
|
||||
// QUATRE
|
||||
// ZERO
|
||||
//
|
||||
// definit au debut de ce fichier. Est-utile pour passer facilement d'une version fp64 (double) fp32(float) fp16(half)
|
||||
|
||||
// Calculer la suite en (x,y) jusqu'à n, à moins que critere arret soit atteint avant
|
||||
// return le nombre d'element de la suite calculer, ie un entier
|
||||
}
|
||||
// Calculer la suite en (x,y) jusqu'à n, à moins que critere arret soit atteint avant
|
||||
// return le nombre d'element de la suite calculer, ie un entier
|
||||
|
||||
real a = ZERO;
|
||||
real b = ZERO;
|
||||
real tmp = ZERO;
|
||||
|
||||
int itr = -1;
|
||||
|
||||
while ( (a*a + b*b <= QUATRE) && (itr < n) ) {
|
||||
tmp = a;
|
||||
a = x + (a*a - b*b);
|
||||
b = DEUX * tmp * b + y;
|
||||
itr++;
|
||||
}
|
||||
|
||||
return itr;
|
||||
|
||||
}
|
||||
|
||||
/////////////////////
|
||||
// Warning:
|
||||
@@ -150,7 +181,7 @@ class MandelbrotMath
|
||||
// Inputs
|
||||
int n;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
|
||||
@@ -40,10 +40,9 @@ Mandelbrot::Mandelbrot(const Grid& grid , uint w , uint h , const DomaineMath& d
|
||||
// Tools
|
||||
this->t = nMin;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Mandelbrot::~Mandelbrot()
|
||||
{
|
||||
Mandelbrot::~Mandelbrot() {
|
||||
// rien
|
||||
}
|
||||
|
||||
@@ -55,28 +54,24 @@ Mandelbrot::~Mandelbrot()
|
||||
* Override
|
||||
* Call periodicly by the API
|
||||
*/
|
||||
void Mandelbrot::process(uchar4* tabPixelsGM , uint w , uint h , const DomaineMath& domaineMath)
|
||||
{
|
||||
assert(false); // to be removed once implemented
|
||||
void Mandelbrot::process(uchar4* tabPixelsGM , uint w , uint h , const DomaineMath& domaineMath) {
|
||||
// TODO Mandelbrot
|
||||
// lauch kernel (you find at line 18)
|
||||
}
|
||||
mandelbrot<<<dg,db>>>(tabPixelsGM,w,h,domaineMath,t);
|
||||
}
|
||||
|
||||
/**
|
||||
* Override
|
||||
* Call periodicly by the API
|
||||
*/
|
||||
void Mandelbrot::animationStep()
|
||||
{
|
||||
void Mandelbrot::animationStep() {
|
||||
this->t = variateurT.varierAndGet();
|
||||
}
|
||||
}
|
||||
|
||||
string titre(int nMin , int nMax)
|
||||
{
|
||||
string titre(int nMin , int nMax) {
|
||||
return "Mandelbrot-Cuda-uchar4-" + mandelbrotReal::realToString() + "-nMin" + std::to_string(nMin) + "-nMax" + std::to_string(nMax);
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
|* Declaration *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
class Mandelbrot: public Animable_I<uchar4>
|
||||
{
|
||||
class Mandelbrot: public Animable_I<uchar4> {
|
||||
/*--------------------------------------*\
|
||||
|* Constructor *|
|
||||
\*-------------------------------------*/
|
||||
@@ -53,7 +52,7 @@ class Mandelbrot: public Animable_I<uchar4>
|
||||
|
||||
// Tools
|
||||
Variateur<int> variateurT;
|
||||
};
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
|
||||
@@ -12,49 +12,56 @@
|
||||
|* Impelmentation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
namespace mandelbrot
|
||||
{
|
||||
namespace mandelbrot {
|
||||
|
||||
class BestGrid
|
||||
{
|
||||
class BestGrid {
|
||||
|
||||
public:
|
||||
|
||||
static Grid get()
|
||||
{
|
||||
const int MP = Hardware::getMPCount();
|
||||
const int CORE_MP = Hardware::getCoreCountMP();
|
||||
static Grid get() {
|
||||
// const int MP = Hardware::getMPCount();
|
||||
// const int CORE_MP = Hardware::getCoreCountMP();
|
||||
|
||||
// fp64 (float 64 bits)
|
||||
#ifdef MANDELBROT_DOUBLE
|
||||
// fp64 (float 64 bits)
|
||||
#ifdef MANDELBROT_DOUBLE
|
||||
|
||||
//TODO Mandelbrot
|
||||
// to remove once coded
|
||||
{
|
||||
Couts::redln("aie aie aie, your best grid won t build itself");
|
||||
assert(false);
|
||||
}
|
||||
#endif
|
||||
const int MP = Hardware::getMPCount();
|
||||
const int CORE_MP = Hardware::getCoreCountMP();
|
||||
|
||||
// fp32 (float 32 bits)
|
||||
#ifdef MANDELBROT_FLOAT
|
||||
//TODO Mandelbrot
|
||||
// to remove once coded
|
||||
{
|
||||
Couts::redln("aie aie aie, your best grid won t build itself");
|
||||
assert(false);
|
||||
}
|
||||
#endif
|
||||
dim3 dg(MP, 1, 1);
|
||||
dim3 db(CORE_MP, 1, 1);
|
||||
Grid grid(dg, db);
|
||||
|
||||
// fp16 (float 32 bits)
|
||||
#ifdef MANDELBROT_HALF
|
||||
//TODO Mandelbrot
|
||||
// to remove once coded
|
||||
{
|
||||
Couts::redln("aie aie aie, your best grid won t build itself");
|
||||
assert(false);
|
||||
}
|
||||
#endif
|
||||
return grid;
|
||||
#endif
|
||||
|
||||
// fp32 (float 32 bits)
|
||||
#ifdef MANDELBROT_FLOAT
|
||||
const int MP = Hardware::getMPCount();
|
||||
const int CORE_MP = Hardware::getCoreCountMP();
|
||||
|
||||
dim3 dg(MP, 1, 1);
|
||||
dim3 db(CORE_MP, 1, 1);
|
||||
Grid grid(dg, db);
|
||||
|
||||
return grid;
|
||||
#endif
|
||||
|
||||
// fp16 (float 32 bits)
|
||||
#ifdef MANDELBROT_HALF
|
||||
const int MP = Hardware::getMPCount();
|
||||
const int CORE_MP = Hardware::getCoreCountMP();
|
||||
|
||||
dim3 dg(MP, 2, 1);
|
||||
dim3 db(CORE_MP, 4, 1);
|
||||
Grid grid(dg, db);
|
||||
|
||||
return grid;
|
||||
#endif
|
||||
// default
|
||||
Couts::redln("Oups, something went wrong on BestGrid settings");
|
||||
assert(false); // unknown type
|
||||
return Grid();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -14,107 +14,101 @@
|
||||
\*---------------------*/
|
||||
|
||||
// Choose one of the two (either/either):
|
||||
//#define MANDELBROT_DOUBLE
|
||||
//#define MANDELBROT_FLOAT
|
||||
#define MANDELBROT_HALF
|
||||
// #define MANDELBROT_DOUBLE // fp64
|
||||
// #define MANDELBROT_FLOAT // fp32
|
||||
#define MANDELBROT_HALF // fp16
|
||||
|
||||
/*----------------------*\
|
||||
|* private *|
|
||||
\*---------------------*/
|
||||
|
||||
namespace mandelbrotReal
|
||||
{
|
||||
namespace mandelbrotReal {
|
||||
|
||||
// fp64 (float 64 bits)
|
||||
#ifdef MANDELBROT_DOUBLE
|
||||
//#define real double
|
||||
using real=double;
|
||||
#endif
|
||||
// fp64 (float 64 bits)
|
||||
#ifdef MANDELBROT_DOUBLE
|
||||
//#define real double
|
||||
using real=double;
|
||||
#endif
|
||||
|
||||
// fp32 (float 32 bits)
|
||||
#ifdef MANDELBROT_FLOAT
|
||||
//#define real float
|
||||
using real=float;
|
||||
#endif
|
||||
// fp32 (float 32 bits)
|
||||
#ifdef MANDELBROT_FLOAT
|
||||
//#define real float
|
||||
using real=float;
|
||||
#endif
|
||||
|
||||
// fp16 (float 16 bits)
|
||||
#ifdef MANDELBROT_HALF
|
||||
//#define real half
|
||||
using real=half;
|
||||
#endif
|
||||
// fp16 (float 16 bits)
|
||||
#ifdef MANDELBROT_HALF
|
||||
//#define real half
|
||||
using real=half;
|
||||
#endif
|
||||
|
||||
static std::string realToString()
|
||||
{
|
||||
static std::string realToString() {
|
||||
|
||||
#ifdef MANDELBROT_DOUBLE
|
||||
return "fp64";
|
||||
#endif
|
||||
#ifdef MANDELBROT_DOUBLE
|
||||
return "fp64";
|
||||
#endif
|
||||
|
||||
#ifdef MANDELBROT_FLOAT
|
||||
return "fp32";
|
||||
#endif
|
||||
#ifdef MANDELBROT_FLOAT
|
||||
return "fp32";
|
||||
#endif
|
||||
|
||||
#ifdef MANDELBROT_HALF
|
||||
return "fp16";
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool isFp16()
|
||||
{
|
||||
|
||||
#ifdef MANDELBROT_DOUBLE
|
||||
return false;
|
||||
#endif
|
||||
|
||||
#ifdef MANDELBROT_FLOAT
|
||||
return false;
|
||||
#endif
|
||||
|
||||
#ifdef MANDELBROT_HALF
|
||||
return true;
|
||||
#endif
|
||||
|
||||
assert(false);
|
||||
}
|
||||
|
||||
static bool isFp32()
|
||||
{
|
||||
|
||||
#ifdef MANDELBROT_DOUBLE
|
||||
return false;
|
||||
#endif
|
||||
|
||||
#ifdef MANDELBROT_FLOAT
|
||||
return true;
|
||||
#endif
|
||||
|
||||
#ifdef MANDELBROT_HALF
|
||||
return false;
|
||||
#endif
|
||||
|
||||
assert(false);
|
||||
}
|
||||
|
||||
static bool isFp64()
|
||||
{
|
||||
|
||||
#ifdef MANDELBROT_DOUBLE
|
||||
return true;
|
||||
#endif
|
||||
|
||||
#ifdef MANDELBROT_FLOAT
|
||||
return false;
|
||||
#endif
|
||||
|
||||
#ifdef MANDELBROT_HALF
|
||||
return false;
|
||||
#endif
|
||||
|
||||
assert(false);
|
||||
}
|
||||
#ifdef MANDELBROT_HALF
|
||||
return "fp16";
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool isFp16() {
|
||||
|
||||
#ifdef MANDELBROT_DOUBLE
|
||||
return false;
|
||||
#endif
|
||||
|
||||
#ifdef MANDELBROT_FLOAT
|
||||
return false;
|
||||
#endif
|
||||
|
||||
#ifdef MANDELBROT_HALF
|
||||
return true;
|
||||
#endif
|
||||
|
||||
assert(false);
|
||||
}
|
||||
|
||||
static bool isFp32() {
|
||||
|
||||
#ifdef MANDELBROT_DOUBLE
|
||||
return false;
|
||||
#endif
|
||||
|
||||
#ifdef MANDELBROT_FLOAT
|
||||
return true;
|
||||
#endif
|
||||
|
||||
#ifdef MANDELBROT_HALF
|
||||
return false;
|
||||
#endif
|
||||
|
||||
assert(false);
|
||||
}
|
||||
|
||||
static bool isFp64() {
|
||||
|
||||
#ifdef MANDELBROT_DOUBLE
|
||||
return true;
|
||||
#endif
|
||||
|
||||
#ifdef MANDELBROT_FLOAT
|
||||
return false;
|
||||
#endif
|
||||
|
||||
#ifdef MANDELBROT_HALF
|
||||
return false;
|
||||
#endif
|
||||
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@ static void raytracingCM2SM();
|
||||
|
||||
int mainBenchmark() {
|
||||
// Please, un a la fois!
|
||||
rippling();
|
||||
// mandelbrot(); // Conseil : use nFixe (by example nMin=nMax=80)
|
||||
// rippling();
|
||||
mandelbrot(); // Conseil : use nFixe (by example nMin=nMax=80)
|
||||
//
|
||||
// raytracingGM();
|
||||
// raytracingSM();
|
||||
|
||||
@@ -44,8 +44,8 @@ int mainBrutforce() {
|
||||
Matlab matlab;
|
||||
|
||||
// Please, un a la fois!
|
||||
rippling(&matlab);
|
||||
// mandelbrot(&matlab); // Conseil : use nFixe (by example nMin=nMax=100)
|
||||
// rippling(&matlab);
|
||||
mandelbrot(&matlab); // Conseil : use nFixe (by example nMin=nMax=100)
|
||||
// raytracingGM(&matlab);
|
||||
// raytracingCM(&matlab);
|
||||
// raytracingSM(&matlab);
|
||||
|
||||
@@ -31,8 +31,8 @@ int mainImage(const Args& args) {
|
||||
ImageOption zoomable(true, true, true, true);
|
||||
ImageOption nozoomable(false, true, false, false);
|
||||
|
||||
Viewer<RipplingProvider> rippling(nozoomable, 0, 0); // imageOption px py
|
||||
// Viewer<MandelbrotProvider> mandelbrot(zoomable, 0, 0);
|
||||
// Viewer<RipplingProvider> rippling(nozoomable, 0, 0); // imageOption px py
|
||||
Viewer<MandelbrotProvider> mandelbrot(zoomable, 0, 0);
|
||||
// Viewer<RaytracingProviderGM> raytracingGM(nozoomable, 0, 0);
|
||||
// Viewer<RaytracingProviderCM> raytracingCM(nozoomable, 0, 0);
|
||||
// Viewer<RaytracingProviderSM> raytracingSM(nozoomable, 0, 0);
|
||||
|
||||
@@ -34,9 +34,9 @@ static void raytracing();
|
||||
int mainTest() {
|
||||
// activer ci-dessous seulement le TP voulu (pas tous)
|
||||
|
||||
rippling();
|
||||
//mandelbrot(); // fp16 only
|
||||
//raytracing(); // voir code ci-dessous pour activer la version voulue
|
||||
rippling();
|
||||
mandelbrot(); // fp16 only
|
||||
// raytracing(); // voir code ci-dessous pour activer la version voulue
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">1.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">0.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -106,7 +106,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:10%" class="tablecell_success">10</td>
|
||||
<td style="width:10%" class="tablecell_success">0</td>
|
||||
<td style="width:10%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">1.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">0.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -123,7 +123,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td class="tablecell_success">testDB2</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">1.000000</td>
|
||||
<td class="tablecell_success">0.000000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tablecell_success">testDB4</td>
|
||||
|
||||
@@ -87,7 +87,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:30%" class="tablecell_success">1</td>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">10.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">15.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -106,7 +106,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:10%" class="tablecell_success">1</td>
|
||||
<td style="width:10%" class="tablecell_success">0</td>
|
||||
<td style="width:10%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">10.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">15.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -123,7 +123,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td class="tablecell_success">performanceOnly</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">10.000000</td>
|
||||
<td class="tablecell_success">15.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="spaced"><a href="#top">Back to top</a>
|
||||
|
||||
@@ -87,7 +87,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">0.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">1.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -106,7 +106,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:10%" class="tablecell_success">13</td>
|
||||
<td style="width:10%" class="tablecell_success">0</td>
|
||||
<td style="width:10%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">0.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">1.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -189,7 +189,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td class="tablecell_success">testMonoBlock</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">0.000000</td>
|
||||
<td class="tablecell_success">1.000000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tablecell_success">testSpecialeMax</td>
|
||||
|
||||
@@ -87,7 +87,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">0.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">1.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -106,7 +106,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:10%" class="tablecell_success">10</td>
|
||||
<td style="width:10%" class="tablecell_success">0</td>
|
||||
<td style="width:10%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">0.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">1.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -171,7 +171,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td class="tablecell_success">testMonoBlock</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">0.000000</td>
|
||||
<td class="tablecell_success">1.000000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tablecell_success">testSpecialeMax</td>
|
||||
|
||||
@@ -87,7 +87,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:30%" class="tablecell_success">1</td>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">11.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">16.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -106,7 +106,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:10%" class="tablecell_success">1</td>
|
||||
<td style="width:10%" class="tablecell_success">0</td>
|
||||
<td style="width:10%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">11.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">16.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -123,7 +123,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td class="tablecell_success">performanceOnly</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">11.000000</td>
|
||||
<td class="tablecell_success">16.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="spaced"><a href="#top">Back to top</a>
|
||||
|
||||
@@ -87,7 +87,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">80.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">87.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -106,7 +106,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:10%" class="tablecell_success">15</td>
|
||||
<td style="width:10%" class="tablecell_success">0</td>
|
||||
<td style="width:10%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">80.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">87.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -183,7 +183,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td class="tablecell_success">testGrid</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">0.000000</td>
|
||||
<td class="tablecell_success">1.000000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tablecell_success">testMonoBlock</td>
|
||||
@@ -195,13 +195,13 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td class="tablecell_success">testspecialGridDGXMAX</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">39.000000</td>
|
||||
<td class="tablecell_success">42.000000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tablecell_success">testSpecialGrid2</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">40.000000</td>
|
||||
<td class="tablecell_success">43.000000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tablecell_success">testSpecialeMax</td>
|
||||
|
||||
@@ -87,7 +87,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:30%" class="tablecell_success">1</td>
|
||||
<td style="width:30%" class="tablecell_success">0</td>
|
||||
<td style="width:30%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">11.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">10.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -106,7 +106,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td style="width:10%" class="tablecell_success">1</td>
|
||||
<td style="width:10%" class="tablecell_success">0</td>
|
||||
<td style="width:10%" class="tablecell_success">100%</td>
|
||||
<td style="width:10%" class="tablecell_success">11.000000</td>
|
||||
<td style="width:10%" class="tablecell_success">10.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
@@ -123,7 +123,7 @@ Designed by <a href="https://github.com/cpptest/cpptest">CppTest</a>
|
||||
<td class="tablecell_success">performanceOnly</td>
|
||||
<td class="tablecell_success">0</td>
|
||||
<td class="tablecell_success">true</td>
|
||||
<td class="tablecell_success">11.000000</td>
|
||||
<td class="tablecell_success">10.000000</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="spaced"><a href="#top">Back to top</a>
|
||||
|
||||
112
Student_Cuda_Tools_Reduction/src/core/02_use_protocole/generic/int/PII/host/ReductionIntII.cu
Executable file → Normal file
112
Student_Cuda_Tools_Reduction/src/core/02_use_protocole/generic/int/PII/host/ReductionIntII.cu
Executable file → Normal file
@@ -1,56 +1,56 @@
|
||||
#include "ReductionIntII.h"
|
||||
|
||||
#include "GM.h"
|
||||
#include "Grid.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <assert.h>
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
using std::to_string;
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Imported *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
extern __global__ void KIntProtocoleII(int* ptrSumGM);
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Constructeur *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
ReductionIntII::ReductionIntII(const Grid& grid , int* ptrSum,bool isVerbose) :
|
||||
//RunnableGPU(grid, "Reduce_Generic_IntII_" + to_string(grid.threadCounts()),isVerbose), // classe parente
|
||||
RunnableGPU(grid, "Reduce_Generic_IntII" ,isVerbose), // classe parente
|
||||
ptrSum(ptrSum) {
|
||||
// TODO ReductionIntII
|
||||
this->sizeSM = grid.threadByBlock() * sizeof(int);
|
||||
|
||||
GM::mallocInt0(&ptrSumGM);
|
||||
}
|
||||
|
||||
ReductionIntII::~ReductionIntII() {
|
||||
// TODO ReductionIntII
|
||||
|
||||
GM::free(ptrSumGM);
|
||||
}
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Methode *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
void ReductionIntII::run() {
|
||||
// TODO ReductionIntII
|
||||
|
||||
KIntProtocoleII<<<dg, db, this->sizeSM>>>(ptrSumGM);
|
||||
GM::memcpyDToH_int(ptrSum, ptrSumGM);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
#include "ReductionIntII.h"
|
||||
|
||||
#include "GM.h"
|
||||
#include "Grid.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <assert.h>
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
using std::to_string;
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Imported *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
extern __global__ void KIntProtocoleII(int* ptrSumGM);
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Constructeur *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
ReductionIntII::ReductionIntII(const Grid& grid , int* ptrSum,bool isVerbose) :
|
||||
//RunnableGPU(grid, "Reduce_Generic_IntII_" + to_string(grid.threadCounts()),isVerbose), // classe parente
|
||||
RunnableGPU(grid, "Reduce_Generic_IntII" ,isVerbose), // classe parente
|
||||
ptrSum(ptrSum) {
|
||||
// TODO ReductionIntII
|
||||
this->sizeSM = grid.threadByBlock() * sizeof(int);
|
||||
|
||||
GM::mallocInt0(&ptrSumGM);
|
||||
}
|
||||
|
||||
ReductionIntII::~ReductionIntII() {
|
||||
// TODO ReductionIntII
|
||||
|
||||
GM::free(ptrSumGM);
|
||||
}
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Methode *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
void ReductionIntII::run() {
|
||||
// TODO ReductionIntII
|
||||
|
||||
KIntProtocoleII<<<dg, db, this->sizeSM>>>(ptrSumGM);
|
||||
GM::memcpyDToH_int(ptrSum, ptrSumGM);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
@@ -29,7 +29,7 @@ static void generic();
|
||||
int mainTest() {
|
||||
// activer ci-dessous seulement le TP voulu (pas tous)
|
||||
|
||||
// add();
|
||||
add();
|
||||
generic();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
@@ -46,7 +46,7 @@ void add() {
|
||||
VTReductionAddIntI test1;
|
||||
VTReductionAddIntII test2;
|
||||
|
||||
// test1.run();
|
||||
test1.run();
|
||||
test2.run();
|
||||
}
|
||||
|
||||
@@ -58,8 +58,8 @@ void generic() {
|
||||
VTReductionGenericII test2;
|
||||
VTReductionGenericLongII test3;
|
||||
|
||||
// test1.run();
|
||||
// test2.run();
|
||||
test1.run();
|
||||
test2.run();
|
||||
test3.run();
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ int mainUse() {
|
||||
|
||||
bool isOk = true;
|
||||
|
||||
// reduction_add(isOk); // voir code ci-dessous pour activer la version voulue
|
||||
reduction_add(isOk); // voir code ci-dessous pour activer la version voulue
|
||||
reduction_generic(isOk); // voir code ci-dessous pour activer la version voulue
|
||||
|
||||
print(isOk);
|
||||
@@ -53,10 +53,10 @@ int mainUse() {
|
||||
*/
|
||||
void reduction_add(bool& isOk) {
|
||||
// InbI
|
||||
// {
|
||||
// UseReductionAddIntI algo(IS_VERBOSE);
|
||||
// isOk &= algo.isOk(IS_VERBOSE);
|
||||
// }
|
||||
{
|
||||
UseReductionAddIntI algo(IS_VERBOSE);
|
||||
isOk &= algo.isOk(IS_VERBOSE);
|
||||
}
|
||||
|
||||
// IntII
|
||||
{
|
||||
@@ -70,16 +70,16 @@ void reduction_add(bool& isOk) {
|
||||
*/
|
||||
void reduction_generic(bool& isOk) {
|
||||
// InbI
|
||||
// {
|
||||
// UseReductionIntI algo(IS_VERBOSE);
|
||||
// isOk &= algo.isOk(IS_VERBOSE);
|
||||
// }
|
||||
{
|
||||
UseReductionIntI algo(IS_VERBOSE);
|
||||
isOk &= algo.isOk(IS_VERBOSE);
|
||||
}
|
||||
|
||||
// IntII
|
||||
// {
|
||||
// UseReductionIntII algo(IS_VERBOSE);
|
||||
// isOk &= algo.isOk(IS_VERBOSE);
|
||||
// }
|
||||
{
|
||||
UseReductionIntII algo(IS_VERBOSE);
|
||||
isOk &= algo.isOk(IS_VERBOSE);
|
||||
}
|
||||
|
||||
// LongII
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user