Search:

Type: Posts; User: shahsaurabh1990

Search: Search took 0.00 seconds.

  1. Re: copying a variable from host memory to device memory

    Can't we do this as we do in C language pass the address of the variable and then what changes we do inside the kernel; they will automatically change the value of the variable and we can get the new...
  2. Replies
    1
    Views
    948

    Regarding the work group size

    I am giving the local workgroup size as NULL in the host program
    If my global item size is a prime number let say 17 which is less than the max workgroup size we can have how many workgroups does...
  3. Replies
    1
    Views
    1,089

    Barrier Function in while loop

    In the kernel function if i am doing min reduction which involves a while loop; i am getting the correct answer for smaller data sets but not getting the correct results for large datasets.
    I think...
  4. copying a variable from host memory to device memory

    I want to copy a variable from host memory to device memory which is not stored in array it is a single variable can you specify how to copy and read it back from the device memory
  5. Can i have two different local arrays for the same workgroup

    So for work threads in the same workgroup can we have two different local arrays
  6. Replies
    0
    Views
    967

    Finding the minimum in an array

    I have used reduction for the calculation of the minimum array; but the problem is that the size of an array should be in power of 2; so if a number is not in power of 2 other than padding wat else...
  7. Replies
    1
    Views
    772

    Comparing two arrays

    I have 2 arrays, i am declaring the global work size equal to the size of one array, and in each thread i am comparing every element of one array with all the other elements of the 2nd array - this i...
  8. Setting the kernel argument for the local memory

    How do we set the kernel argument for the local memory in the host code???
  9. dot product of two vectors using reduction

    #include <stdio.h>
    #include <stdlib.h>

    #ifdef __APPLE__
    #include <OpenCL/opencl.h>
    #else
    #include <CL/cl.h>
    #endif

    #define MAX_SOURCE_SIZE (0x100000)
  10. Re: Kernel for finding the minimum element in the array

    In the above kernel function k is the size of B vector
  11. Re: Kernel for finding the minimum element in the array

    __kernel void u(__global int *A, __global int *B, __global int *C,int k)
    {

    // Get the index of the current element
    int i = get_global_id(0); //this will get you the index
    ...
  12. Re: Kernel for finding the minimum element in the array

    can you please give me a simple kernel function which gives you the minimum element in an array.
  13. get_global_id(0)

    what is the significance of 0 inside the brackets
  14. kernel function for cartesian product of two sets A and B

    I have written the kernel for computing the cartesian product of A and B
    So my cartesian product will have elements where each element is a pair; first element of the pair i am storing in C and...
  15. Replies
    4
    Views
    1,121

    Re: Regarding the kernel function

    Now the code is running; it was not accessing the GPU through a virtual instance therefore i ran the code on the machine where the Gpu card was installed, now it is running correctly
  16. Replies
    4
    Views
    1,121

    Re: Regarding the kernel function

    i have written a kernel for union function between 2 vectors

    kernel(a,b,c,k)
    {
    int i=get_global_id(0);
    int j;
    int v;
    v=0;
    for(j=0;j<k;j++)
    {
  17. Replies
    4
    Views
    1,121

    Regarding the kernel function

    In my kernel function i have given arguments as three vectors A,B and C respectively.
    A and B are input vector ; C is the output vector
    kernel function is as follows
    {
    int i=get_global_id(0);...
  18. Replies
    0
    Views
    836

    finding intersection of two sets

    Can you suggest any algorithm which could be implemented using opencl for intersection of two sets??
  19. Re: Can i call the same kernel function multiple times in a

    I am writing an OpenCL code which parallelizes finding the minimum number in an array.
    Here is my kernel function:
    What i am doing is comparing all the elements with all the other elements and the...
  20. Kernel for finding the minimum element in the array

    I am writing an OpenCL code which parallelizes finding the minimum number in an array.
    Here is my kernel function:
    What i am doing is comparing all the elements with all the other elements and the...
  21. Re: Can i call the same kernel function multiple times in a

    Can we have print statements inside the kernel function??
  22. Can i call the same kernel function multiple times in a loop

    I have two for loops, in the outer for loop i want the result of inner for loop, what I want to do is parallelize the inner for loop which i will be doing using OpenCL. So for the outer loop i need...
Results 1 to 22 of 22