Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ include(config_ccache)
option(AF_BUILD_CPU "Build ArrayFire with a CPU backend" ON)
option(AF_BUILD_CUDA "Build ArrayFire with a CUDA backend" ${CUDA_FOUND})
option(AF_BUILD_OPENCL "Build ArrayFire with a OpenCL backend" ${OpenCL_FOUND})
option(AF_BUILD_ONEAPI "Build ArrayFire with a oneAPI backend" OFF)
option(AF_BUILD_UNIFIED "Build Backend-Independent ArrayFire API" ON)
option(AF_BUILD_DOCS "Create ArrayFire Documentation" ${DOXYGEN_FOUND})
option(AF_BUILD_EXAMPLES "Build Examples" ON)
Expand Down Expand Up @@ -355,6 +356,7 @@ add_subdirectory(src/api/cpp)

conditional_directory(AF_BUILD_CPU src/backend/cpu)
conditional_directory(AF_BUILD_CUDA src/backend/cuda)
conditional_directory(AF_BUILD_ONEAPI src/backend/oneapi)
conditional_directory(AF_BUILD_OPENCL src/backend/opencl)
conditional_directory(AF_BUILD_UNIFIED src/api/unified)

Expand All @@ -370,6 +372,10 @@ if(TARGET afcuda)
list(APPEND built_backends afcuda)
endif()

if(TARGET afoneapi)
list(APPEND built_backends afoneapi)
endif()

if(TARGET afopencl)
list(APPEND built_backends afopencl)
endif()
Expand Down
3 changes: 2 additions & 1 deletion include/af/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,8 @@ typedef enum {
AF_BACKEND_DEFAULT = 0, ///< Default backend order: OpenCL -> CUDA -> CPU
AF_BACKEND_CPU = 1, ///< CPU a.k.a sequential algorithms
AF_BACKEND_CUDA = 2, ///< CUDA Compute Backend
AF_BACKEND_OPENCL = 4 ///< OpenCL Compute Backend
AF_BACKEND_OPENCL = 4, ///< OpenCL Compute Backend
AF_BACKEND_ONEAPI = 8 ///< OneAPI Compute Backend
} af_backend;
#endif

Expand Down
Loading