Most of the vector macros are available as standard OpenCL operators or
functions. You can get a listing of those here:
https://www.khronos.org/files/opencl-1-2-quick-reference-card.pdf

e.g. VSCALE(a, b, c) can be replaced with a = b * c

So yes you can use translate the code like you mentioned.

On Sun, Mar 19, 2017 at 9:37 PM, Shailesh Tripathi , B.Tech., Electronics
Engg., IIT (BHU), Varanasi (INDIA) <shailesh.tripathi.ec...@iitbhu.ac.in>
wrote:

> Also,
> For scalar multiplication VSCALE() is used in the C code. Can I simply use
> multiplication operator (*) in the kernel as VSCALE in unavailable in
> OpenCL.
> C code:
> *VSCALE(norm_pprime, dprime, VDOT(pprime, dprime));*
> OpenCL code:
>
> * norm_pprime = dprime * dot(pprime, dprime);*
> Regards
> Shailesh
>
> Shailesh Tripathi
> B.Tech. Part-III
> Electronics Engineering
> IIT-BHU (Varanasi)
>
> On Mon, Mar 20, 2017 at 12:11 AM, Shailesh Tripathi , B.Tech., Electronics
> Engg., IIT (BHU), Varanasi (INDIA) <shailesh.tripathi.ec...@iitbhu.ac.in>
> wrote:
>
>> Hello,
>> While writing the.cl file, I got stuck at a data type "*bn_poly_t*" and "
>> *bn_complex_t*". To use this in kernels, can these definitions be
>> imported or do I need to define these structures in the .cl file itself. Is
>> there a way to import these, or if not, defining them would not be any
>> issue. :)
>>
>> Regards
>> Shailesh
>>
>>
>> Shailesh Tripathi
>> B.Tech. Part-III
>> Electronics Engineering
>> IIT-BHU (Varanasi)
>>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> BRL-CAD Developer mailing list
> brlcad-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>
>


-- 
Vasco Alexandre da Silva Costa
PhD in Computer Engineering (Computer Graphics)
Instituto Superior T├ęcnico/University of Lisbon, Portugal
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel
  • ... Shailesh Tripathi , B.Tech., Electronics Engg., IIT (BHU), Varanasi (INDIA)
    • ... Shailesh Tripathi , B.Tech., Electronics Engg., IIT (BHU), Varanasi (INDIA)
      • ... Shailesh Tripathi , B.Tech., Electronics Engg., IIT (BHU), Varanasi (INDIA)
        • ... Vasco Alexandre da Silva Costa
          • ... Shailesh Tripathi
      • ... Vasco Alexandre da Silva Costa
    • ... Vasco Alexandre da Silva Costa
      • ... Shailesh Tripathi
        • ... Vasco Alexandre da Silva Costa
          • ... Shailesh Tripathi

Reply via email to