A Computationally Efficient Algorithm to Search Chord Shapes on the Guitar Fretboard

I aim to develop a computationally-efficient algorithm to search all possible chords on the guitar fretboard using existing tonality models.