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

Definitions:
  - &small_matrix_size_range
    - { N:     1 }
    - { N:     4 }
    - { N:    16 }
    - { N:    33 }
    - { N:    65 }

  - &special_case_range
    - { N: 0, incx: 1, batch_count: 1 }
    - { N: 1, incx: 1, batch_count: 0 }
    # invalid_arg checks
    - { 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:  1000 }
    - { N:  2011 }

  - &large_matrix_size_range
    - { N:  2048 }
    - { N:  4011 }

  - &alpha_range
    - { alpha: -1.0 }
    - { alpha:  1.0 }
    - { alpha:  0.0 }

  - &alpha_range_small
    - { alpha: 2.0 }

  - &alpha_nan
    - { alpha: .NaN }

Tests:

- name: hpr_bad_arg
  category: pre_checkin
  function:
  - hpr_bad_arg: *single_double_precisions_complex
  - hpr_batched_bad_arg: *single_double_precisions_complex
  - hpr_strided_batched_bad_arg: *single_double_precisions_complex
  fortran: [ false, true ]

- name: hpr_arg_check
  category: quick
  function:
  - hpr: *single_double_precisions_complex
  - hpr_batched: *single_double_precisions_complex
  - hpr_strided_batched: *single_double_precisions_complex
  uplo: L
  matrix_size: *special_case_range

- name: hpr_fortran
  category: quick
  function: hpr
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx: [ 2 ]
  alpha_beta: *alpha_range_small
  fortran: true

- name: hpr_NaN
  category: quick
  function: hpr
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  N: [ 32 ]
  incx: [ 1 ]
  alpha_beta: *alpha_nan

- name: hpr_small
  category: quick
  function: hpr
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx: [ 1, -2, 13 ]
  alpha_beta: *alpha_range

- name: hpr_medium
  category: pre_checkin
  function: hpr
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx: [ 2, -2 ]
  alpha_beta: *alpha_range

- name: hpr_large
  category: nightly
  function: hpr
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *large_matrix_size_range
  incx: [ 1 ]
  alpha_beta: *alpha_range_small

# batched
- name: hpr_batched_fortran
  category: quick
  function: hpr_batched
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx: [ 2 ]
  alpha_beta: *alpha_range_small
  batch_count: [ -1, 0, 3 ]
  fortran: true

- name: hpr_batched_small
  category: quick
  function: hpr_batched
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx: [ 1, -2, 13 ]
  alpha_beta: *alpha_range
  batch_count: [ 1, 5 ]

- name: hpr_batched_medium
  category: pre_checkin
  function: hpr_batched
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx: [ 2, -2 ]
  alpha_beta: *alpha_range
  batch_count: [ 1, 3 ]

- name: hpr_batched_large
  category: nightly
  function: hpr_batched
  precision: *single_double_precisions_complex
  uplo: [ U ]
  matrix_size: *large_matrix_size_range
  incx: [ 1 ]
  alpha_beta: *alpha_range_small
  batch_count: [ 1, 3 ]

# strided batched
- name: hpr_strided_batched_fortran
  category: quick
  function: hpr_strided_batched
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx: [ 2 ]
  alpha_beta: *alpha_range_small
  batch_count: [ -1, 0, 3 ]
  stride_scale: [ 2 ]
  fortran: true

- name: hpr_strided_batched_small
  category: quick
  function: hpr_strided_batched
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx: [ 1, -2, 13 ]
  alpha_beta: *alpha_range
  stride_scale: [ 1.0, 2.5 ]
  batch_count: [ 1, 5 ]

- name: hpr_strided_batched_medium
  category: pre_checkin
  function: hpr_strided_batched
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx: [ 2, -2 ]
  alpha_beta: *alpha_range
  stride_scale: [ 1.0 ]
  batch_count: [ 1, 3 ]

- name: hpr_strided_large
  category: nightly
  function: hpr_strided_batched
  precision: *single_double_precisions_complex
  uplo: [ L ]
  matrix_size: *large_matrix_size_range
  incx: [ 1 ]
  alpha_beta: *alpha_range_small
  stride_scale: [ 1.0 ]
  batch_count: [ 1, 3 ]

...
