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

Definitions:
  - &small_matrix_size_range
    - { M:     0, N:     0, lda:     1, ldb:     1, ldc:     1 }
    - { M:     3, N:    33, lda:    35, ldb:    35, ldc:    35 }
    - { M:    10, N:    11, lda:   100, ldb:    12, ldc:    13 }

  - &tiny_matrix_size
    - { M:   192, N:   193, lda:   194, ldb:   195, ldc:   196 }

  - &large_matrix_size_range
    - { M:   192, N:   193, lda:   194, ldb:   195, ldc:   196 }
    - { M:   640, N:   641, lda:   960, ldb:   961, ldc:   962 }
    - { M:  1001, N:  1000, lda:  1003, ldb:  1002, ldc:  1001 }

  - &huge_matrix_size_range
    - { M:  4011, N:  4012, lda:  4012, ldb:  4013, ldc:  4014 }

  - &small_alpha_beta_range
    - { alpha:  0.0, beta:  0.0 }
    - { alpha:  2.0, beta:  0.0 }
    - { alpha:  0.0, beta:  2.0 }
    - { alpha: -3.0, beta: -2.0 }

  - &large_alpha_beta_range
    - { alpha:  2.0, beta:  0.0 }
    - { alpha:  0.0, beta:  2.0 }
    - { alpha: -2.0, beta: -3.0 }

  - &huge_alpha_beta_range
    - { alpha:  1.0, beta:  3.0 }

  - &small_complex_alpha_beta_range
    - { alpha:  2, beta:  0, alphai:  0, betai:  0 }
    - { alpha:  0, beta:  2, alphai:  0, betai:  0 }
    - { alpha:  0, beta:  0, alphai:  2, betai:  0 }
    - { alpha:  0, beta:  0, alphai:  0, betai:  2 }
    - { alpha: -2, beta: -3, alphai: -4, betai: -5 }

  - &large_complex_alpha_beta_range
    - { alpha:  1, beta:  2, alphai:  3, betai:  4 }

  - &huge_complex_alpha_beta_range
    - { alpha:  4, beta:  3, alphai:  2, betai:  1 }

  - &transA_transB_range
    - { transA: N, transB: N }
    - { transA: N, transB: T }
    - { transA: N, transB: C }
    - { transA: T, transB: N }
    - { transA: T, transB: T }
    - { transA: T, transB: C }
    - { transA: C, transB: N }
    - { transA: C, transB: T }
    - { transA: C, transB: C }

Tests:
- name: geam_bad_arg
  category: quick
  function: geam_bad_arg
  precision: *single_precision
  transA: [N]
  transB: [N]
  stride_scale: [ 1 ]
  batch_count: [ 1 ]
  fortran: [ false, true ]

- name: geam_size_t
  category: nightly
  function: geam
  precision: *single_precision
  transA: [N]
  transB: [N]
  matrix_size:
    - { M:     4, N: 51200, lda: 51200, ldb:     4, ldc:     4 }
    - { M:     4, N: 51200, lda:     4, ldb: 51200, ldc:     4 }
    - { M:     4, N: 51200, lda:     4, ldb:     4, ldc: 51200 }
  alpha_beta:
    - { alpha:  1.0, beta:  1.0 }
  stride_scale: [ 1 ]
  batch_count: [ 1 ]
  fortran: [ false ]

- name: geam_batched_bad_arg
  category: quick
  function: geam_batched_bad_arg
  precision: *single_precision
  transA: [N]
  transB: [N]
  batch_count: [        1    ]
  fortran: [ false, true ]

- name: geam_strided_batched_bad_arg
  category: quick
  function: geam_strided_batched_bad_arg
  precision: *single_precision
  transA: [N]
  transB: [N]
  stride_scale: [ 1         ]
  batch_count: [        1    ]
  fortran: [ false, true ]

- name: geam_NaN
  category: quick
  function: geam
  precision: *single_double_precisions
  transA_transB: *transA_transB_range
  matrix_size: *tiny_matrix_size
  alpha: [ 1.0, .NaN ]  # NaN is converted to 0.0 in test code
  beta: [ 0.5, 1.0, .NaN ]

- name: geam_small
  category: quick
  function: geam
  precision: *single_double_precisions
  transA_transB: *transA_transB_range
  matrix_size: *small_matrix_size_range
  alpha_beta: *small_alpha_beta_range
  fortran: [ false, true ]

- name: geam_batched_small
  category: quick
  function: geam_batched
  precision: *single_double_precisions
  transA_transB: *transA_transB_range
  matrix_size: *small_matrix_size_range
  alpha_beta: *small_alpha_beta_range
  batch_count: [        1, 2 ]
  fortran: [ false, true ]

- name: geam_strided_batched_small
  category: quick
  function: geam_strided_batched
  precision: *single_double_precisions
  transA_transB: *transA_transB_range
  matrix_size: *small_matrix_size_range
  alpha_beta: *small_alpha_beta_range
  stride_scale: [ 1, 2      ]
  batch_count: [        1, 2 ]
  fortran: [ false, true ]

- name: geam_small_complex
  category: quick
  function: geam
  precision: *single_double_precisions_complex
  transA_transB: *transA_transB_range
  matrix_size: *small_matrix_size_range
  alpha_beta: *small_complex_alpha_beta_range
  fortran: [ false, true ]

- name: geam_batched_small_complex
  category: quick
  function: geam_batched
  precision: *single_double_precisions_complex
  transA_transB: *transA_transB_range
  matrix_size: *small_matrix_size_range
  alpha_beta: *small_complex_alpha_beta_range
  batch_count: [        1, 2 ]
  fortran: [ false, true ]

- name: geam_strided_batched_small_complex
  category: quick
  function: geam_strided_batched
  precision: *single_double_precisions_complex
  transA_transB: *transA_transB_range
  matrix_size: *small_matrix_size_range
  alpha_beta: *small_complex_alpha_beta_range
  stride_scale: [ 1, 2      ]
  batch_count: [        1, 2 ]
  fortran: [ false, true ]

- name: geam_large
  category: pre_checkin
  function: geam
  precision: *single_double_precisions
  transA_transB: *transA_transB_range
  matrix_size: *large_matrix_size_range
  alpha_beta: *large_alpha_beta_range

- name: geam_large_complex
  category: pre_checkin
  function: geam
  precision: *single_double_precisions_complex
  transA_transB: *transA_transB_range
  matrix_size: *large_matrix_size_range
  alpha_beta: *large_complex_alpha_beta_range

- name: geam_batched_large_complex
  category: pre_checkin
  function: geam_batched
  precision: *single_double_precisions_complex
  transA_transB: *transA_transB_range
  matrix_size: *large_matrix_size_range
  alpha_beta: *large_complex_alpha_beta_range
  batch_count: [        1, 2 ]

- name: geam_strided_batched_large_complex
  category: pre_checkin
  function: geam_strided_batched
  precision: *single_double_precisions_complex
  transA_transB: *transA_transB_range
  matrix_size: *large_matrix_size_range
  alpha_beta: *large_complex_alpha_beta_range
  stride_scale: [ 1, 2      ]
  batch_count: [        1, 2 ]

- name: geam_huge
  category: nightly
  function: geam
  precision: *single_double_precisions
  transA_transB: *transA_transB_range
  matrix_size: *huge_matrix_size_range
  alpha_beta: *huge_alpha_beta_range

- name: geam_huge_complex
  category: nightly
  function: geam
  precision: *single_double_precisions_complex
  transA_transB: *transA_transB_range
  matrix_size: *huge_matrix_size_range
  alpha_beta: *huge_complex_alpha_beta_range
...
