Skip to content

Conversation

@leios
Copy link
Owner

@leios leios commented Jul 12, 2025

After #4, users have the ability to specify keywords in both verses and stanzas, but not poems.

This is because the poems ultimately transform into kernels and keywords are tricky to implement in C (I guess you could do some variadic tricks, but it's not worth figuring out at this time.

Long story short, there are advantages to allowing users to set keywords for poems. These could be set automatically when kernels are configured, so the user doesn't need to manually set the arguments.

The problem is that I cannot find a way to support all keywords. I have attached a simple sketch that does most of the work for simple keywords (let's say a = 5), but it is missing the translation from '5' (a char) to a void * necessary for OpenCL. This is doable and was actually mainly done in 5a41798#diff-51ed3eaef734d969a6896d213bba2507fd36aad88a28207bdf2726916aa525c8L97.

The problem is kwargs like a = 5*x. This poses 2 problems:

  1. What is x? Where is it defined? In some random C code?
  2. How do I parse 5*x in the simple method used above?

So long-story short, kwargs for poems are half-baked at best, but there's probably a good way to do this if I think about it a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants