Implemented workgroups number and buffer size calculation.