<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Texto de balão Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-US;}
span.EstiloDeEmail17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.TextodebaloChar
        {mso-style-name:"Texto de balão Char";
        mso-style-priority:99;
        mso-style-link:"Texto de balão";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=PT-BR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'>Dear all, <o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'><o:p> </o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'>I´m having trouble trying to understand the results I obtained in comparisons between CPU and GPU VTK ray casting. <o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'><o:p> </o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'>Machine configuration: Intel(R) Xeon(R) CPU W3680 @ 3.33 GHz 2.79 GHz RAM 24.0 GB, Win 7 64, Video card GTX 580 512 CUDA cores (3 cards in SLI mode).<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'><o:p> </o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'>The results show that GPU are only four times faster than CPU, but why only four times? Shouldn´t the threads be distributed on all cores and therefore shouldn´t we expect a much faster result?<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'><o:p> </o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'>_______________________<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'><o:p> </o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'>Here is the C# CPU code:<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'><o:p> </o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'>//VTK CPU RAY CAST<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'> vtkVolumeRayCastMapper volumeMapper = vtkVolumeRayCastMapper.New();<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'> volumeMapper.SetInput((vtkImageData)imData);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'> vtkVolumeRayCastCompositeFunction compositeFunction = new vtkVolumeRayCastCompositeFunction();<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'> volumeMapper.SetVolumeRayCastFunction(compositeFunction);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'> <o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'>and here the C# GPU code:<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'><o:p> </o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'> //VTKGPU RAYCAST<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'> vtkGPUVolumeRayCastMapper volumeMapper = vtkGPUVolumeRayCastMapper.New();<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'> volumeMapper.SetBlendModeToComposite();<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'> //volumeMapper.SetBlendModeToMaximumIntensity();<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'> //volumeMapper.SetMaxMemoryInBytes(1048576000);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'> volumeMapper.SetMaxMemoryFraction(MemoFRACGPU);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:PT-BR'> volumeMapper.SetInput((vtkImageData)imData);<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="72%" style='width:72.28%'><tr style='height:62.55pt'><td width=155 style='width:116.25pt;padding:0cm 0cm 0cm 0cm;height:62.55pt'><p class=MsoNormal><span style='font-size:7.5pt;color:#333333;mso-fareast-language:PT-BR'><img width=155 height=59 id="Imagem_x0020_1" src="cid:image001.gif@01CD05D6.19704220" alt="Descrição: Descrição: Descrição: Descrição: cid:image002.gif@01CBCDCB.66841B20"></span><span style='font-size:7.5pt;color:#333333;mso-fareast-language:PT-BR'><o:p></o:p></span></p></td><td style='padding:0cm 0cm 0cm 0cm;height:62.55pt'><p class=MsoNormal style='line-height:115%'><b><span style='color:#1F497D;mso-fareast-language:PT-BR'>Walmor Cardoso Godoi, DSc</span></b><b><span style='color:#1F497D;mso-fareast-language:PT-BR'><o:p></o:p></span></b></p><p class=MsoNormal style='margin-left:-.15pt;line-height:115%;text-autospace:none'><span style='font-size:9.0pt;line-height:115%;color:gray;mso-fareast-language:PT-BR'>Researcher<o:p></o:p></span></p><p class=MsoNormal style='line-height:115%'><span style='font-size:9.0pt;line-height:115%;color:gray;mso-fareast-language:PT-BR'>Divisão de Materiais - DVMT <i>(Materials Division)</i><o:p></o:p></span></p><p class=MsoNormal style='line-height:115%'><span style='font-size:9.0pt;line-height:115%;color:gray;mso-fareast-language:PT-BR'>Departamento de Tecnologia em Materiais - DPTM <i>(Department of Materials Technology)</i><o:p></o:p></span></p><p class=MsoNormal style='line-height:115%'><span style='font-size:9.0pt;line-height:115%;color:gray;mso-fareast-language:PT-BR'>Instituto de Tecnologia para o Desenvolvimento - LACTEC <i>(Institute of Technology for Development)<o:p></o:p></i></span></p><p class=MsoNormal style='margin-left:-.15pt;line-height:115%;text-autospace:none'><span style='font-size:9.0pt;line-height:115%;color:#0033CC;mso-fareast-language:PT-BR'><a href="mailto:walmor.godoi@lactec.org.br"><span style='color:blue'>walmor.godoi@lactec.org.br</span></a> </span><span style='color:#0033CC;mso-fareast-language:PT-BR'><a href="http://www.lactec.org.br/"><span style='font-size:9.0pt;line-height:115%;color:#0033CC'>www.lactec.org.br</span></a></span><span style='font-size:9.0pt;line-height:115%;color:#0033CC;mso-fareast-language:PT-BR'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:-.15pt;line-height:115%;text-autospace:none'><span style='font-size:9.0pt;line-height:115%;color:gray;mso-fareast-language:PT-BR'>Fone <i>(Phone)</i>: +55 41 3361-6891 Fax: +55 41 3361-6137</span><span style='font-size:9.0pt;line-height:115%;color:#0033CC;mso-fareast-language:PT-BR'><o:p></o:p></span></p></td></tr></table><p class=MsoNormal><span style='mso-fareast-language:PT-BR'><o:p> </o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>