• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OpenCL Basic Programming Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenCL Basic Programming Question


  • Subject: Re: OpenCL Basic Programming Question
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Tue, 18 Feb 2014 11:34:08 +0700

On 14 Feb 2014, at 21:53, Gerriet M. Denkmann <email@hidden> wrote:

> I am trying to build the Basic Programming Sample in: <https://developer.apple.com/library/mac/documentation/Performance/Conceptual/OpenCL_MacProgGuide/ExampleHelloWorld/Example_HelloWorld.html#//apple_ref/doc/uid/TP40008312-CH112-SW2>
>
> I have myKernel.cl:
>
> __kernel void squareq(  __global float* input, __global float* output )
> {
> 	int i = get_global_id(0);
> 	printf("i %d\n",i);			//	never seen
> 	output[i] = input[i] * input[i];
> }
>
> and myKernel.cl.h:
>
> void squareq_kernel( cl_ndrange *range, float* input,  float* output);
>
[...]
>
> What am I doing wrong?

Do NOT create your own "myKernel.cl.h"; do NOT add this file to Xcode.
If you did violate this rule (as I did), rename the file (and maybe change the name of the kernel as well) and start again.

Also I also removed the underscores in the kernel definition. Not sure whether this is necessary.

Maybe this might help someone.

Gerriet.



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >OpenCL Basic Programming Question (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: auto layout, 10.9, and NSScrollView and friends
  • Next by Date: Re: Paged UIScrollview is acting strange in iOS7?
  • Previous by thread: Re: OpenCL Basic Programming Question
  • Next by thread: PDFPage init methods not called
  • Index(es):
    • Date
    • Thread