Results 1 to 5 of 5

Thread: Minimal kernel name length

  1. #1
    Junior Member
    Join Date
    Jul 2012
    Posts
    8

    Minimal kernel name length

    Hello,

    I have searched in the standards and couldn't find the minimum kernel length as defined by the standards...
    Does anybody know what it is?

    Thanks !

  2. #2
    Senior Member
    Join Date
    Dec 2011
    Posts
    153

    Re: Minimal kernel name length

    I'd expect the minimum name length for a kernel to be 1 alpha character. Why is this important, and why not just try it rather than ask here?

  3. #3
    Junior Member
    Join Date
    Jul 2012
    Posts
    8

    Re: Minimal kernel name length

    Hey,

    this matters when dynamically generate code, and when the kernel function name also has to be generated. It can be useful to know if we generate a name too long for the standards for portability issues...

    These numbers can be found for C99 http://c0x.coding-guidelines.com/5.2.4.1.html , and I'm wondering if they are the same for OpenCL, that is 31 characters for external identifier and 63 for internal identifiers, because i couldn't find the explicit information in the OpenCL specifications...

    I tested it on AMD/NVidia and had different results.

  4. #4
    Senior Member
    Join Date
    Dec 2011
    Posts
    153

    Re: Minimal kernel name length

    So what you're looking for is the maximum unique name length, not minimum.

    With 31 characters you could name every atom on earth. Do you have more kernels than that?

    Even if you could create 40,000 kernels per second, you'd only need 7 characters to name as many of you could generate in a year.

  5. #5
    Junior Member
    Join Date
    Jul 2012
    Posts
    8

    Re: Minimal kernel name length

    I can feel your sarcasm
    Indeed I made quite a mistake in my question, confusing minimal and maximal.

    It was more a matter of knowing until when we can have a unique representation in the kernel name. If you are generating code for arbitrary long linear algebra expression, then including all the possible operators and datastructures involved in an operation you get a pretty big set of possible operations.

    x = Ax - y + s*z or x = Ax + s*z - y that is the same but maps to a different expression tree
    y = w + sin(x) + cos(y)
    z = w + A*sin(x)...

    Of course, my problem only arise if I want the kernel name to describe the operation it does, I can indeed maintain a counter with which I could generate kernels until the next prediction of the end of the world without having to worry about kernel name error

Similar Threads

  1. Replies: 6
    Last Post: 04-11-2012, 07:18 PM
  2. Passing variable length structure to kernel
    By kungen85 in forum OpenCL
    Replies: 4
    Last Post: 10-08-2009, 12:47 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
  •