import '../../../../../globals.js';
// Copyright 2024, University of Colorado Boulder
/**
 * Uses a scanned histogram to perform a step of the radix sort.
 *
 * @author Jonathan Olson <jonathan.olson@colorado.edu>
 */
import { alpenglow, DIRECT_MODULE_DEFAULTS, DirectModule, MAIN_RADIX_SCATTER_DEFAULTS, mainRadixScatterWGSL } from '../../../imports.js';
import { combineOptions } from '../../../../../phet-core/js/optionize.js';
export const MAIN_RADIX_SCATTER_MODULE_DEFAULTS = {
    // eslint-disable-next-line phet/no-object-spread-on-non-literals
    ...DIRECT_MODULE_DEFAULTS,
    // eslint-disable-next-line phet/no-object-spread-on-non-literals
    ...MAIN_RADIX_SCATTER_DEFAULTS
};
// inputSize: number
export default class MainRadixScatterModule extends DirectModule {
    constructor(providedOptions) {
        const options = combineOptions({
            main: mainRadixScatterWGSL(providedOptions),
            setDispatchSize: (dispatchSize, inputSize) => {
                dispatchSize.x = Math.ceil(inputSize / (providedOptions.workgroupSize * providedOptions.grainSize));
            }
        }, providedOptions);
        super(options);
        this.input = options.input;
        this.output = options.output;
    }
}
alpenglow.register('MainRadixScatterModule', MainRadixScatterModule);
//# sourceMappingURL=MainRadixScatterModule.js.map