Greetings all,
I am currently working on a project that has me evaluating pathfinding algorithms (both SSSP and APSP) in a cluster environment. If I am evaluating the performance of an implementation using the nodes’ CPUs, then I do not need to utilize an atomicMin function when comparing the cost values (I’m just using 1 core/node). If, however, I am utilizing a GPU to do the processing (be it on one node or many), then an atomicMin is necessary. The catch is that I am wanting to record both the cost AND the predecessor values.
My question then is, since the atomicMin function in the CUDA library only supports ints (as far as I can tell), is there a way to write a custom atomic function? Alternately, is there a way to -link- 2 atomic functions? For reference, I’m keeping track of the costs and predecessors in an array of structs. Each struct consists of (2) ints - cost and predecessor. I only actually need the atomicMin function for the cost, but I need to make sure that the appropriate predecessor value is stored with it.
I appreciate any and all help and suggestions!
Charles Johnson
PS For the record, when I say ‘project’ above, I am not referring to a class project. Unless, that is, you consider a Master’s thesis a class project ;-)