Reusing a ray generation program for multiple entry points (never mind, figured it out right after I

I am looking to extend my Optix based EM-wave propagation simulation to support multiple transmitters in different locations. All transmitters can use the same ray generation program, but with slightly different parameters (location, transmit direction).

My idea was to set up multiple entry points with the same ray generation program but slightly different parameters, but it seems like this is impossible. There is no variable scope related to the entry point, and I don’t see a way to get the entry point index inside the ray generation program. I could make a single entry point with a 3D launch instead of multiple entry points with a 2D launch, but conceptually it seems like that will degrade performance unless my transmitters are close together and pointing in the same direction (which they won’t be).

Is there a way around this, or is the only way to do this to import the same PTX code into a new Optix Program for each entry point, and set my transmitter variables in the Program scope? It seems like that will lead to a needlessly large executable and long compilation time if I want to scale to a large number of transmitters.

edit: Of course I came up with a solution as soon as I posted this:
I can just set my transmitter parameters at the Context level before each launch, since you only launch one entry point at a time anyway. It’s a bit clunky, but if I write a simple wrapper function for the launch that includes setting the transmitter parameters it should work just fine.