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

Definitions:
  - &small_matrix_size_range
    - { M:     4, K:     2, lda:    10 }
    - { M:    10, K:     2, lda:    10 }
    - { M:    10, K:     8, lda:    9  }
    - { M:     1, K:     0, lda:    1  }
    - { M:    10, K:    10, lda:    2  }
    - { M:     9, K:     9, lda:   20  }
    - { M:     9, K:    15, lda:   20  }
    - { M:     9, K:    10, lda:   11  }
    - { M:   100, K:    60, lda:   65  }

  - &special_case_range
    - { M: 0, K: 0, lda: 1, incx: 1, batch_count: 1 }
    - { M: 1, K: 1, lda: 2, incx: 1, batch_count: 0 }

    - { M: -1, K:  0, lda: 1, incx: 1, batch_count:  0 }
    - { M:  0, K: -1, lda: 1, incx: 1, batch_count:  0 }
    - { M:  0, K:  0, lda: 0, incx: 1, batch_count:  0 }
    - { M:  0, K:  4, lda: 4, incx: 1, batch_count:  0 }
    - { M:  0, K:  0, lda: 1, incx: 0, batch_count:  0 }
    - { M:  0, K:  0, lda: 1, incx: 1, batch_count: -1 }

  - &manybatch_range
    - { M:  10, K:   5, lda:   7 }
    - { M: 150, K: 125, lda: 126 }
    - { M: 150, K: 125, lda: 150 }

  - &medium_matrix_size_range
    - { M:   63,  K:   8,   lda:  128 }
    - { M:   65,  K:   8,   lda:   10 }
    - { M:   65,  K:   12,  lda:  128 }
    - { M:   65,  K:   32,  lda:  128 }
    - { M:   64,  K:   8,   lda:  128 }
    - { M:   64,  K:   45,  lda:  128 }
    - { M:   127, K:   8,   lda:  127 }
    - { M:   127, K:   100, lda:  101 }
    - { M:   128, K:   5,   lda:  128 }
    - { M:   128, K:   8,   lda:  128 }
    - { M:   128, K:   20,  lda:  128 }
    - { M:   128, K:   40,  lda:  128 }
    - { M:   128, K:   60,  lda:   63 }
    - { M:   128, K:   63,  lda:  128 }
    - { M:   128, K:   64,  lda:  128 }
    - { M:   128, K:   100, lda:  128 }
    - { M:   512, K:   256, lda:  512 }
    - { M:   512, K:   5,   lda:  512 }
    - { M:   512, K:   8,   lda:  512 }
    - { M:   512, K:   9,   lda:  512 }
    - { M:   512, K:   10,  lda:  512 }
    - { M:   512, K:   20,  lda:  511 }
    - { M:   300, K:   100, lda:  400 }
    - { M:   600, K:   500, lda:  601 }

  - &large_matrix_size_range
    - { M:  1000, K:  5,    lda: 1000 }
    - { M:  2000, K:  1999, lda: 2000 }
    - { M:  4011, K:  512,  lda: 550 }

  - &incx_range
    - { incx:  -5 }
    - { incx:   1 }
    - { incx:  10 }

  - &incx_range_small
    - { incx: 2 }


Tests:
- name: tbmv_bad_arg
  category: pre_checkin
  function:
    - tbmv_bad_arg
    - tbmv_batched_bad_arg
    - tbmv_strided_batched_bad_arg
  precision: *single_double_precisions
  uplo: U
  transA: N
  diag: N
  fortran: [ false, true ]

- name: tbmv_arg_check
  category: quick
  function:
  - tbmv: *single_double_precisions
  - tbmv_batched: *single_double_precisions
  - tbmv_strided_batched: *single_double_precisions
  uplo: L
  transA: N
  diag: N
  matrix_size: *special_case_range

- name: tbmv_fortran
  category: quick
  function: tbmv
  precision: *single_double_precisions_complex_real
  uplo: [U, L]
  transA: [ N, T, C ]
  diag: [U, N]
  matrix_size: *small_matrix_size_range
  incx_incy: *incx_range_small
  fortran: true

- name: tbmv_batched_fortran
  category: quick
  function: tbmv_batched
  precision: *single_double_precisions_complex_real
  uplo: [U, L]
  transA: [ N, T, C ]
  diag: [U, N]
  matrix_size: *small_matrix_size_range
  incx_incy: *incx_range_small
  batch_count: [ -1, 0, 3 ]
  fortran: true

- name: tbmv_strided_batched_fortran
  category: quick
  function: tbmv_strided_batched
  precision: *single_double_precisions_complex_real
  uplo: [U, L]
  transA: [ N, T, C ]
  diag: [U, N]
  matrix_size: *small_matrix_size_range
  incx_incy: *incx_range_small
  batch_count: [ -1, 0, 3 ]
  stride_scale: [ 2 ]
  fortran: true

- name: tbmv_small
  category: quick
  function: tbmv
  precision: *single_double_precisions_complex_real
  uplo: [U, L]
  transA: [ N, T, C ]
  diag: [U, N]
  matrix_size: *small_matrix_size_range
  incx_incy: *incx_range

- name: tbmv_batched_small
  category: quick
  function: tbmv_batched
  precision: *single_double_precisions_complex_real
  uplo: [U, L]
  transA: [ N, T, C ]
  diag: [U, N]
  matrix_size: *small_matrix_size_range
  incx_incy: *incx_range
  batch_count: [ -1, 0, 1, 3 ]

- name: tbmv_strided_batched_small
  category: quick
  function: tbmv_strided_batched
  precision: *single_double_precisions_complex_real
  uplo: [U, L]
  transA: [ N, T, C ]
  diag: [U, N]
  matrix_size: *small_matrix_size_range
  incx_incy: *incx_range
  stride_scale: [ 1, 10, 100 ]
  batch_count: [ -1, 0, 1, 3 ]

- name: tbmv_medium
  category: pre_checkin
  function: tbmv
  precision: *single_double_precisions_complex_real
  uplo: [U, L]
  transA: [ N, T, C ]
  diag: [U, N]
  matrix_size: *medium_matrix_size_range
  incx_incy: *incx_range

- name: tbmv_batched_medium
  category: pre_checkin
  function: tbmv_batched
  precision: *single_double_precisions_complex_real
  uplo: [U, L]
  transA: [ N, T, C ]
  diag: [U, N]
  batch_count: [3]
  matrix_size: *medium_matrix_size_range
  incx_incy: *incx_range

- name: tbmv_strided_batched_medium
  category: pre_checkin
  function: tbmv_strided_batched
  precision: *single_double_precisions_complex_real
  uplo: [U, L]
  transA: [ N, T, C ]
  diag: [U, N]
  stride_scale: [ 1 ]
  batch_count: [3]
  matrix_size: *medium_matrix_size_range
  incx_incy: *incx_range

- name: tbmv_large
  category: nightly
  function: tbmv
  precision: *single_double_precisions_complex_real
  uplo: [U, L]
  transA: [ N, T, C ]
  diag: [U, N]
  matrix_size: *large_matrix_size_range
  incx_incy: *incx_range_small
  batch_count: [ 3 ]

- name: tbmv_batched_large
  category: nightly
  function: tbmv_batched
  precision: *single_double_precisions_complex_real
  uplo: [U, L]
  transA: [ N, T, C ]
  diag: [U, N]
  matrix_size: *large_matrix_size_range
  incx_incy: *incx_range_small
  batch_count: [ 3 ]

- name: tbmv_strided_batched_large
  category: nightly
  function: tbmv_strided_batched
  precision: *single_double_precisions_complex_real
  uplo: [U, L]
  transA: [ N, T, C ]
  diag: [U, N]
  matrix_size: *large_matrix_size_range
  incx_incy: *incx_range_small
  stride_scale: [ 1 ]
  batch_count: [ 3 ]

- name: tbmv_batched_manybatch
  category: nightly
  function: tbmv_batched
  precision: *single_double_precisions
  uplo: [U, L]
  transA: [ N, T, C ]
  diag: [U, N]
  matrix_size: *manybatch_range
  incx_incy: *incx_range_small
  batch_count: [256]

- name: tbmv_strided_batched_manybatch
  category: nightly
  function: tbmv_strided_batched
  precision: *single_double_precisions
  uplo: [U, L]
  transA: [ N, T, C ]
  diag: [U, N]
  matrix_size: *manybatch_range
  incx_incy: *incx_range_small
  stride_scale: [ 1.5 ]
  batch_count: [256]

...
