---
include: rocblas_common.yaml
include: known_bugs.yaml

Definitions:
  - &special_case_range
    - { N: 0, lda: 1, K: 0, incx: 1, incy: 1, batch_count: 1 }
    - { N: 1, lda: 1, K: 0, batch_count: 0 }

    - { N: -1, lda: 1, K:  0, incx: 1, incy: 1, batch_count:  0 }
    - { N:  0, lda: 1, K: -1, incx: 1, incy: 1, batch_count:  0 }
    - { N:  0, lda: 1, K:  1, incx: 1, incy: 1, batch_count:  0 }
    - { N:  0, lda: 1, K:  0, incx: 0, incy: 1, batch_count:  0 }
    - { N:  0, lda: 1, K:  0, incx: 1, incy: 0, batch_count:  0 }
    - { N:  0, lda: 1, K:  0, incx: 1, incy: 1, batch_count: -1 }

  - &tiny_matrix
    - { N:    33, lda:   33, K:  3}

  - &medium_matrix_size_range
    - { N:    -1, lda:   -1, K:  -1 }
    - { N:    10, lda:    2, K:  -1 }
    - { N:    33, lda:   33, K:  1}
    - { N:    33, lda:   33, K:  32 }
    - { N:   300, lda:  600, K:  99 }

  - &large_matrix_size_range
    - { N:  4011, lda:  4011, K:  53 }
    - { N:  8000, lda:  8000, K:  129 }

  - &incx_incy_range
    - { incx:   1, incy:   1 }
    - { incx:   0, incy:  -1 }
    - { incx:   2, incy:   1 }
    - { incx:  -1, incy:  -1 }

  - &incx_incy_range_small
    - { incx: -2, incy: 2 }

  - &alpha_beta_range
    - { alpha:  1.0, beta:  0.0 }
    - { alpha: -1.0, beta: -1.0 }
    - { alpha:  2.0, beta:  1.0 }
    - { alpha:  0.0, beta:  1.0 } # quick success

  - &alpha_beta_range_small
    - { alpha: 2.0, beta: 1.5 }

  - &alpha_beta_range_nan
    - { alpha: .NaN, beta: 1.5 }
    - { alpha: 1.2, beta: .NaN }

Tests:
- name: sbmv_bad
  category: pre_checkin
  function: sbmv_bad_arg
  precision: *single_precision

- name: sbmv_arg_check
  category: quick
  function:
  - sbmv
  - sbmv_batched
  - sbmv_strided_batched
  precision: *single_double_precisions
  uplo: L
  matrix_size: *special_case_range

- name: sbmv_NaN
  category: pre_checkin
  function: sbmv
  precision: *single_double_precisions
  uplo: [ U ]
  matrix_size: *tiny_matrix
  incx_incy: *incx_incy_range_small
  alpha_beta: *alpha_beta_range_nan

- name: sbmv_medium
  category: pre_checkin
  function: sbmv
  precision: *single_double_precisions
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx_incy: *incx_incy_range
  alpha_beta: *alpha_beta_range

- name: sbmv_large
  category: nightly
  function: sbmv
  precision: *single_double_precisions
  uplo: [ U, L ]
  matrix_size: *large_matrix_size_range
  incx_incy: *incx_incy_range_small
  alpha_beta: *alpha_beta_range_small

  # batched
- name: sbmv_batched_bad
  category: pre_checkin
  function: sbmv_batched_bad_arg
  precision: *single_precision

- name: sbmv_batched_medium
  category: pre_checkin
  function: sbmv_batched
  precision: *single_double_precisions
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx_incy: *incx_incy_range
  alpha_beta: *alpha_beta_range
  batch_count: [ -1, 0, 1, 257 ]

- name: sbmv_batched_large
  category: nightly
  function: sbmv_batched
  precision: *single_double_precisions
  uplo: [ U, L ]
  matrix_size: *large_matrix_size_range
  incx_incy: *incx_incy_range_small
  alpha_beta: *alpha_beta_range_small
  batch_count: [ 1, 3 ]

  # strided batched
- name: sbmv_strided_batched_bad
  category: pre_checkin
  function: sbmv_strided_batched_bad_arg
  precision: *single_precision

- name: sbmv_strided_batched_medium
  category: pre_checkin
  function: sbmv_strided_batched
  precision: *single_double_precisions
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx_incy: *incx_incy_range_small
  alpha_beta: *alpha_beta_range_small
  batch_count: [ -1, 0, 1, 257 ]
  stride_scale: [1]

- name: sbmv_strided_batched_large
  category: nightly
  function: sbmv_strided_batched
  precision: *single_double_precisions
  uplo: [ U, L ]
  matrix_size: *large_matrix_size_range
  incx_incy: *incx_incy_range_small
  alpha_beta: *alpha_beta_range_small
  batch_count: [ 1, 3 ]
  stride_scale: [1]


...
