Results 1 to 2 of 2

Thread: Caching of source files

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Posts
    25

    Caching of source files

    When writing code with multiple source files, for example

    "fox.cl"
    Code :
    struct Tango {
       float4 donut;
       float4 snow;
    };

    "mykernel.cl"
    Code :
    #include "fox.cl"
    __kernel void myKernel(__global struct *Tango)
    {
        // do some work on Tango structs
    }

    Now if I were to change something in fox.cl, for example
    Code :
    struct Tango {
       float4 donut;
       float4 snow;
       float4 wood;
    };

    Quite often it the change will not be recognized when I rebuild the program. Trying to access member wood will return an error. However if I instead add something entirely new, like
    Code :
    struct Tango {
       float4 donut;
       float4 snow;
       float4 wood;
    };
     
    struct Swing {
       float4 bread;
       float4 rain;
       float4 brick;
    };

    The new struct will be recognized with all the members (however wood is typically still unacessible).

    Now I haven't found much info about how OpenCL caches the source in the documentations. I'm guessing it is platform dependent. I'm having trouble figuring out what is wrong since the problem does not occur consistently.

    Does anyone have a clue as to what is going on here?

  2. #2
    Junior Member
    Join Date
    Oct 2011
    Posts
    25

    Re: Caching of source files

    If anyone got the same problem I sort of solved it by deleting everything in NVIDIA\ComputeCache every time I change source files that #included.

Similar Threads

  1. caching variables from arrays
    By memo in forum OpenCL
    Replies: 2
    Last Post: 11-13-2009, 05:01 PM
  2. Caching consideration
    By zaemin in forum OpenVG and VGU
    Replies: 1
    Last Post: 04-18-2007, 02:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •