The pilots get the THS setting when running the W&B calculations, using whatever method (tables or software). It's set according to the aircraft's center of gravity.
The flaps setting and THS setting aren't calculated by the plane, at least with standard equipment. The fields on the FMGS T/O PERF page for flaps and THS are optional and are just reminders for the pilots. They don't appear to serve any other purpose.