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

Definitions:
  - &small_matrix_size_range
    - { N:     4 }
    - { N:    10 }
    - { N:    32 }
    - { N:    50 }
    - { N:    64 }
    - { N:   100 }
    - { N:   128 }

  - &special_case_range
    - { N: 0, incx: 1, batch_count: 1 }
    - { N: 1, incx: 1, batch_count: 0 }

    - { N: -1, incx: 1, batch_count:  0 }
    - { N:  0, incx: 0, batch_count:  0 }
    - { N:  0, incx: 1, batch_count: -1 }

  - &medium_matrix_size_range
    - { N:   192 }
    - { N:   255 }
    - { N:   256 }
    - { N:   257 }

  - &large_matrix_size_range
    - { N:  1024 }
    - { N:  2000 }

  - &common_args
    precision: *single_double_precisions_complex_real
    uplo: [L, U]
    transA: [N, T, C]
    diag: [N, U]

Tests:
- name: tpsv_arg_check
  category: quick
  function:
  - tpsv: *single_double_precisions
  - tpsv_batched: *single_double_precisions
  - tpsv_strided_batched: *single_double_precisions
  uplo: L
  transA: N
  diag: N
  matrix_size: *special_case_range

# Regular tpsv
- name: tpsv_bad_arg
  category: pre_checkin
  function: tpsv_bad_arg
  precision: *single_double_precisions_complex_real
  uplo: [ L ]
  transA: [ N ]
  diag: [ N ]
  fortran: [ false, true ]

- name: tpsv_fortran
  category: quick
  function: tpsv
  arguments: *common_args
  matrix_size: *small_matrix_size_range
  incx: [ 2 ]
  fortran: true

- name: tpsv_small
  category: quick
  function: tpsv
  arguments: *common_args
  matrix_size: *small_matrix_size_range
  incx: [ -2, 1, 2, 100 ]

- name: tpsv_medium
  category: pre_checkin
  function: tpsv
  arguments: *common_args
  matrix_size: *medium_matrix_size_range
  incx: [ 1 ]

- name: tpsv_large
  category: nightly
  function: tpsv
  arguments: *common_args
  matrix_size: *large_matrix_size_range
  incx: [ 1 ]

# tpsv_batched
- name: tpsv_batched_bad_arg
  category: pre_checkin
  function: tpsv_batched_bad_arg
  precision: *single_double_precisions_complex_real
  uplo: [ L ]
  transA: [ N ]
  diag: [ N ]
  fortran: [ false, true ]

- name: tpsv_batched_fortran
  category: quick
  function: tpsv_batched
  arguments: *common_args
  matrix_size: *small_matrix_size_range
  incx: [ 2 ]
  batch_count: [ -1, 0, 3 ]
  fortran: true

- name: tpsv_batched_small
  category: quick
  function: tpsv_batched
  arguments: *common_args
  matrix_size: *small_matrix_size_range
  incx: [ -2, 1, 2, 100 ]
  stride_scale: [ 1, 10 ]
  batch_count: [ 1, 5 ]

- name: tpsv_batched_medium
  category: pre_checkin
  function: tpsv_batched
  arguments: *common_args
  matrix_size: *medium_matrix_size_range
  incx: [ 1 ]
  batch_count: [ 3 ]

- name: tpsv_batched_large
  category: nightly
  function: tpsv_batched
  arguments: *common_args
  matrix_size: *large_matrix_size_range
  incx: [ 1 ]
  batch_count: [ 2 ]

# tpsv_strided_batched
- name: tpsv_strided_batched_bad_arg
  category: pre_checkin
  function: tpsv_strided_batched_bad_arg
  precision: *single_double_precisions_complex_real
  uplo: [ L ]
  transA: [ N ]
  diag: [ N ]
  fortran: [ false, true ]

- name: tpsv_strided_batched_fortran
  category: quick
  function: tpsv_strided_batched
  arguments: *common_args
  matrix_size: *small_matrix_size_range
  incx: [ 2 ]
  batch_count: [ -1, 0, 3 ]
  stride_scale: [ 2 ]
  fortran: true

- name: tpsv_strided_batched_small
  category: quick
  function: tpsv_strided_batched
  arguments: *common_args
  matrix_size: *small_matrix_size_range
  incx: [ -2, 1, 2, 100 ]
  stride_scale: [ 1, 10 ]
  batch_count: [ 1, 5 ]

- name: tpsv_strided_batched_medium
  category: pre_checkin
  function: tpsv_strided_batched
  arguments: *common_args
  matrix_size: *medium_matrix_size_range
  incx: [ 1 ]
  incx: [ 1 ]
  stride_scale: [ 2.5 ]
  batch_count: [ 3 ]

- name: tpsv_strided_batched_large
  category: nightly
  function: tpsv_strided_batched
  arguments: *common_args
  matrix_size: *large_matrix_size_range
  incx: [ 1 ]
  stride_scale: [ 1 ]
  batch_count: [ 2 ]
...
