package io.synor.compute;

/**
 * Options for matrix multiplication operations.
 */
public class MatMulOptions {
    private final Precision precision;
    private final ProcessorType processor;
    private final Priority priority;

    private MatMulOptions(Builder builder) {
        this.precision = builder.precision;
        this.processor = builder.processor;
        this.priority = builder.priority;
    }

    public Precision getPrecision() {
        return precision;
    }

    public ProcessorType getProcessor() {
        return processor;
    }

    public Priority getPriority() {
        return priority;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static class Builder {
        private Precision precision = Precision.FP32;
        private ProcessorType processor = ProcessorType.AUTO;
        private Priority priority = Priority.NORMAL;

        public Builder precision(Precision precision) {
            this.precision = precision;
            return this;
        }

        public Builder processor(ProcessorType processor) {
            this.processor = processor;
            return this;
        }

        public Builder priority(Priority priority) {
            this.priority = priority;
            return this;
        }

        public MatMulOptions build() {
            return new MatMulOptions(this);
        }
    }
}
