# export functions to the local environment
useDynLib(ardea, .registration = TRUE)

# imports
importFrom("methods", "is")
importFrom("utils",
           "packageVersion",
           "getS3method")

###### -- sentinel functions for optional capabilities ------------------------
# availability
export(metal_is_available)
export(cuda_is_available)
export(opencl_is_available)
# device presence
export(metal_devices_exist)
export(cuda_devices_exist)
export(opencl_devices_exist)

# other
export(supported_types_by_context)

###### -- opencl default capabilities -----------------------------------------
# these must query `opencl_is_available` at the top ? maybe?

# device query
export(opencl_device_information)

# handle management
export(opencl_make_kernelptr)
export(opencl_make_program)
export(opencl_make_context)

# dispatch wrappers
export(simple_wrapper)

###### -- metal functions -----------------------------------------------------
# these must query `metal_is_available` at the top

# device_query
export(metal_device_information)

# handle management
export(metal_make_kernelptr)
export(metal_make_program)
export(metal_make_context)

###### -- cuda functions ------------------------------------------------------
# these must query `cuda_is_available` at the top

# device query
export(cuda_device_information)

# handle management
export(cuda_make_kernelptr)
export(cuda_make_program)
export(cuda_make_context)


# class methods
S3method(print, "device_list")
S3method(print, "alternative_device")
