how to change array_view to array for this code
[code]void Zoom(Picture *source, Picture *destination) { int rows = destination->Rows; int cols = destination->Cols; int centerx = source->CenterX; int centery = source->CenterY; int radius = source->Radius; float xrate = (float)rows / (float)radius / 2; float yrate = (float)cols / (float)radius / 2; unsigned int * src = (unsigned int *)source->Data; unsigned int *dest = (unsigned int *)destination->Data; array_view<const unsigned int, 2> SV(source->Rows,source->Cols,src); array_view<unsigned int, 2> DV(rows,cols,dest); DV.discard_data(); parallel_for_each(DV.extent, [=](index<2> idx) restrict(amp) { int x = idx[0], y = idx[1]; int xx = x / xrate + centerx - radius; int yy = y / yrate + centery - radius; DV[idx] = SV(xx,yy); }); DV.synchronize(); concurrency::amp_uninitialize(); }[/code]


JLCPCB – Prototype 10 PCBs for $2 (For Any Color)

China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w

Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir