stumbled across this question 5 months later, but here are my findings after my own googling as of april 2015:
You cant run a 4k TV with only HDMI inputs at 60hz from any Mac. I recently purchased the exact TV you linked, the 40" samsung UHD. It only has HDMI inputs, and my rocketfish DP to HDMI adapter cable going from my mid-2014 rMBP with OSX 10.10.3 does not work at 4K at all. According to my googling none of the DP-to-HDMI cables output HDMI 2.0. ALthough there may be some coming to market in the next few months (from accell/bizlink).
Going from the HDMI 1.4 output on my rMBP I can get 4k, but only at 30hz.
Also, a samsung online chat rep informed me that none of their TV's have displayport inputs. Only their 28" and 32" computer monitors.
So, regretfully, I'm about to return my beautiful 40" TV to bestbuy and get a smaller 28" monitor with DisplayPort input. The world isnt quite ready for running OSX on a 40" TV at 60hz.