Added the ability to specify the output length.
Modified the reduction operators so that it is clearer that the data returned is equal to the amount of workgroups.
Updated erl nif with output length.