# Data types are defined as either aliases to Python-recognized ctypes,
# or enums defined with c_int base clases and attributes.
Datatypes:
  - int: c_int
  - hipblasDatatype_t:
      bases: [ c_int ]
      attr:
        f16_r: 150
        f32_r: 151
        f64_r: 152
        f16_c: 153
        f32_c: 154
        f64_c: 155
        i8_r:  160
        u8_r:  161
        i32_r: 162
        u32_r: 163
        i8_c:  164
        u8_c:  165
        i32_c: 166
        u32_c: 167
        bf16_r: 168
        bf16_c: 169
  - { half: f16_r, single: f32_r, double: f64_r }
  - { half complex: f16_c, single complex: f32_c, double complex: f64_c }
  - hipblas_initialization:
      bases: [ c_int ]
      attr:
        rand_int: 111
        trig_float: 222
        hpl: 333
  - hipblas_atomics_mode:
      bases: [ c_int ]
      attr:
        atomics_not_allowed: 0
        atomics_allowed: 1

Real precisions: &real_precisions
  - &half_precision
    { a_type: f16_r, b_type: f16_r, c_type: f16_r, d_type: f16_r, compute_type: f16_r }
  - &hpa_half_precision
    { a_type: f16_r, b_type: f16_r, c_type: f16_r, d_type: f16_r, compute_type: f32_r }
  - &single_precision
    { a_type: f32_r, b_type: f32_r, c_type: f32_r, d_type: f32_r, compute_type: f32_r }
  - &double_precision
    { a_type: f64_r, b_type: f64_r, c_type: f64_r, d_type: f64_r, compute_type: f64_r }
  - &int8_precision
    { a_type:  i8_r, b_type:  i8_r, c_type: i32_r, d_type: i32_r, compute_type: i32_r }
  - &bf16_precision
    { a_type:  bf16_r, b_type:  bf16_r, c_type: bf16_r, d_type: bf16_r, compute_type: bf16_r }
  - &hpa_bf16_precision
    { a_type:  bf16_r, b_type:  bf16_r, c_type: bf16_r, d_type: bf16_r, compute_type: f32_r }

C precisions: &single_double_precisions
  - *single_precision
  - *double_precision

Short simple precisions: &half_single_precisions
  - *half_precision
  - *single_precision

Short precisions: &int8_half_single_precisions
  - *int8_precision
  - *half_precision
  - *single_precision

ML precisions: &hpa_half_single_precisions
  - *hpa_half_precision
  - *half_precision
  - *single_precision

Non-int precisions: &hpa_half_single_double_precisions
  - *hpa_half_precision
  - *half_precision
  - *single_precision
  - *double_precision

Simple precisions: &half_single_double_precisions
  - *half_precision
  - *single_precision
  - *double_precision

Complex precisions: &complex_precisions
  - &half_precision_complex
    { a_type: f16_c, b_type: f16_c, c_type: f16_c, d_type: f16_c, compute_type: f16_c }
  - &hpa_half_precision_complex
    { a_type: f16_c, b_type: f16_c, c_type: f16_c, d_type: f16_c, compute_type: f32_c }
  - &single_precision_complex
    { a_type: f32_c, b_type: f32_c, c_type: f32_c, d_type: f32_c, compute_type: f32_c }
  - &double_precision_complex
    { a_type: f64_c, b_type: f64_c, c_type: f64_c, d_type: f64_c, compute_type: f64_c }
  - &int8_precision_complex
    { a_type:  i8_c, b_type:  i8_c, c_type: i32_c, d_type: i32_c, compute_type: i32_c }
  - &hpa_bf16_precision_complex
    { a_type:  bf16_c, b_type:  bf16_c, c_type: bf16_c, d_type: bf16_c, compute_type: f32_c }

Half Precision complex and real: &half_precision_complex_real
  - *half_precision
  - *half_precision_complex

Hpa Half Precision complex and real: &hpa_half_precision_complex_real
  - *hpa_half_precision
  - *hpa_half_precision_complex

Single Precision complex and real: &single_precision_complex_real
  - *single_precision
  - *single_precision_complex

Double Precision complex and real: &double_precision_complex_real
  - *double_precision
  - *double_precision_complex

int8 Precision complex and real: &int8_precision_complex_real
  - *int8_precision
  - *int8_precision_complex

hpabf16 Precision complex and real: &hpa_bf16_precision_complex_real
  - *hpa_bf16_precision
  - *hpa_bf16_precision_complex

C precisions complex: &single_double_precisions_complex
  - *single_precision_complex
  - *double_precision_complex

C precisions complex and real: &single_double_precisions_complex_real
  - *single_precision
  - *double_precision
  - *single_precision_complex
  - *double_precision_complex

Short simple precisions complex and real: &half_single_precisions_complex_real
  - *half_precision
  - *single_precision
  - *half_precision_complex
  - *single_precision_complex

Short precisions complex and real: &int8_half_single_precisions_complex_real
  - *int8_precision
  - *half_precision
  - *single_precision
  - *int8_precision_complex
  - *half_precision_complex
  - *single_precision_complex

ML precisions complex and real: &hpa_half_single_precisions_complex_real
  - *hpa_half_precision
  - *half_precision
  - *single_precision
  - *hpa_half_precision_complex
  - *half_precision_complex
  - *single_precision_complex

Non-int precisions complex and real: &hpa_half_single_double_precisions_complex_real
  - *hpa_half_precision
  - *half_precision
  - *single_precision
  - *double_precision
  - *hpa_half_precision_complex
  - *half_precision_complex
  - *single_precision_complex
  - *double_precision_complex

Simple precisions complex and real: &half_single_double_precisions_complex_real
  - *half_precision
  - *single_precision
  - *double_precision
  - *half_precision_complex
  - *single_precision_complex
  - *double_precision_complex

#############################################
#               Used for Scal               #
#############################################
Joined precisions: &complex_real_in_complex_out
  - &single_precision_complex_real_in_complex_out
    { a_type: f32_c, b_type: f32_r, c_type: f32_r, d_type: f32_c, compute_type: f32_c }
  - &double_precision_complex_real_in_complex_out
    { a_type: f64_c, b_type: f64_r, c_type: f64_r, d_type: f64_c, compute_type: f64_c }

Single double joined: &single_double_complex_real_in_complex_out
  - *single_precision_complex_real_in_complex_out
  - *double_precision_complex_real_in_complex_out

#############################################
#             Used for Scal_ex              #
#############################################
Hpa half and half: &hpa_half_half_precisions
  - *hpa_half_precision
  - *half_precision

#############################################
#               Used for rot*               #
#############################################
Complex real mixed: &complex_real_mixed
  - &single_precision_complex_real_in_complex_compute
    { a_type: f32_c, b_type: f32_r, c_type: f32_c, d_type: f32_c, compute_type: f32_c }
  - &double_precision_complex_real_in_complex_compute
    { a_type: f64_c, b_type: f64_r, c_type: f64_c, d_type: f64_c, compute_type: f64_c }
  - &single_precision_complex_real_in_real_compute
    { a_type: f32_c, b_type: f32_r, c_type: f32_c, d_type: f32_c, compute_type: f32_r }
  - &double_precision_complex_real_in_real_compute
    { a_type: f64_c, b_type: f64_r, c_type: f64_c, d_type: f64_c, compute_type: f64_r }
  - &single_precision_complex_real_c
    { a_type: f32_c, b_type: f32_c, c_type: f32_r, d_type: f32_c, compute_type: f32_c }
  - &double_precision_complex_real_c
    { a_type: f64_c, b_type: f64_c, c_type: f64_r, d_type: f64_c, compute_type: f64_c }



rot precisions: &rot_precisions
  - *single_precision
  - *double_precision
  - *single_precision_complex_real_in_complex_compute
  - *single_precision_complex_real_in_real_compute
  - *double_precision_complex_real_in_complex_compute
  - *double_precision_complex_real_in_real_compute

rot_ex precisions: &rot_ex_precisions
  - *single_precision
  - *double_precision
  - *single_precision_complex
  - *double_precision_complex
  - *hpa_half_precision
  - *hpa_bf16_precision
  - *single_precision_complex_real_c
  - *double_precision_complex_real_c

rotg precisions: &rotg_precisions
  - *single_precision
  - *double_precision
  - *single_precision_complex_real_in_complex_compute
  - *double_precision_complex_real_in_complex_compute

#############################################
#           Used for Dot (quick)            #
#############################################
Half bfloat single double complex real: &half_bfloat_single_double_complex_real_precisions
  - *half_precision
  - *hpa_bf16_precision
  - *single_precision
  - *double_precision
  - *half_precision_complex
  - *single_precision_complex
  - *double_precision_complex

#############################################
#           Used for axpy_ex                #
#############################################
Hpa single double complex real: &half_single_double_complex_real_precisions
  - *single_precision
  - *double_precision
  - *single_precision_complex
  - *double_precision_complex
  - *hpa_half_precision
  - *half_precision

#############################################
#           Used for nrm2_ex                #
#############################################
nrm2_ex precisions: &nrm2_ex_precisions
  - &half_precision_nrm2
    { a_type: f16_r, b_type: f16_r, c_type: f32_r, d_type: f32_r, compute_type: f32_r }
  - *single_precision
  - *double_precision
  - *single_precision_complex_real_in_real_compute
  - *double_precision_complex_real_in_real_compute

nrm2_ex precisions double: &nrm2_ex_precisions_double
  - *double_precision
  - *double_precision_complex_real_in_real_compute

Arguments:
  - M: int
  - N: int
  - K: int
  - KL: int
  - KU: int
  - lda: int
  - ldb: int
  - ldc: int
  - ldd: int
  - a_type: hipblasDatatype_t
  - b_type: hipblasDatatype_t
  - c_type: hipblasDatatype_t
  - d_type: hipblasDatatype_t
  - compute_type: hipblasDatatype_t
  - incx: int
  - incy: int
  - incd: int
  - incb: int
  - alpha: c_double
  - alphai: c_double
  - beta: c_double
  - betai: c_double
  - transA: c_char
  - transB: c_char
  - side: c_char
  - uplo: c_char
  - diag: c_char
  - batch_count: int
  - stride_a: int
  - stride_b: int
  - stride_c: int
  - stride_d: int
  - stride_x: int
  - stride_y: int
  - fortran: c_bool
  - norm_check: int
  - unit_check: int
  - timing: int
  - iters: int
  - cold_iters: int
  - algo: c_uint
  - solution_index: c_int
  - function: c_char*64
  - name: c_char*64
  - category: c_char*64
  - initialization: hipblas_initialization
  - known_bug_platforms: c_char*64
  - c_noalias_d: c_bool
  - atomics_mode: hipblas_atomics_mode

# These named dictionary lists [ {dict1}, {dict2}, etc. ] supply subsets of
# test arguments in a structured way. The dictionaries are applied to the test
# one at a time, to generate combinations.  If one of this table's entries is
# a dictionary of size one, it means that the argument named by its key takes
# on values paired with argument named by its value. For example:
#
# - function: precision
#
# when used with the code:
#
# function:
#   func1: prec1
#   func2: prec2
#   func3: prec3
#
# causes (function, precision) to take on the values (func1, prec1),
# (func2, prec2), (func3, prec3), etc.

Dictionary lists to expand:
  - arguments
  - transA_transB
  - alpha_beta
  - alphai_betai
  - incx_incy
  - matrix_size
  - precision
  - function: precision

# In case an array argument needs to be passed directly to C as an array,
# it needs to be listed here to avoid being expanded into multiple test
# cases with each of its elements.
Lists to not expand:
  - e.g., an array argument not to be expanded

# Defaults
Defaults:
  M: -1
  N: -1
  K: -1
  KL: -1
  KU: -1
  incx: 0
  incy: 0
  incd: 0
  incb: 0
  alpha: 1.0
  alphai: 0.0
  beta: 0.0
  betai: 0.0
  transA: '*'
  transB: '*'
  side: '*'
  uplo: '*'
  diag: '*'
  batch_count: -1
  fortran: false
  norm_check: 0
  unit_check: 1
  timing: 0
  iters: 10
  cold_iters: 2
  algo: 0
  solution_index: 0
  atomics_mode: atomics_allowed
  workspace_size: 0
  initialization: rand_int
  category: nightly
  known_bug_platforms: ''
  name: hipblas-bench
  c_noalias_d: false
