Complete the following steps to use by application on Windows:
Move to installed examples directory:
$ cd <install_dir>\examples
Define the environment variable
AOCL_ROOTto point to AOCL libs installation that has AOCL-BLAS, AOCL-LAPACK and AOCL-Utils libraries:$ set AOCL_ROOT="C:\Program Files\AMD\AOCL-Windows"
Define
SPARSE_ROOTto point to the AOCL-Sparse package installation path:$ set SPARSE_ROOT="%HOME%\amd\aocl-sparse"
Add AOCL-Sparse, AOCL-BLAS, AOCL-LAPACK and AOCL-Utils library paths to the environment path variable:
$ set PATH="%SPARSE_ROOT%\lib;%PATH%" $ set PATH="%AOCL_ROOT%\amd-blis\lib\ILP64;%PATH%" $ set PATH="%AOCL_ROOT%\amd-libflame\lib\ILP64;%PATH%" $ set PATH="%AOCL_ROOT%\amd-utils\lib;%PATH%"
Configure the build system to compile sample applications. Ensure that the build configuration is same as the one used to build the AOCL-Sparse library for the variable BUILD_ILP64:
$ cmake -S . -B out_sparse -G "Visual Studio 17 2022" -T "clangcl" -DCMAKE_CXX_COMPILER=clang-cl -DBUILD_SHARED_LIBS=ON -DBUILD_ILP64=OFF -DSUPPORT_OMP=OFF
Compile the sample applications:
$ cmake --build out_sparse
Run the application:
$ .\out_sparse\sample_mv_cpp.exe
Note
The environment variable SPARSE_ROOT takes precedence when
searching for sparse library and headers. If the environment variable
SPARSE_ROOT is not defined, SPARSE_ROOT inherits the path from
AOCL_ROOT and looks for AOCL-Sparse installation in AOCL_ROOT. If the
sparse library/headers are not found neither in SPARSE_ROOT nor in
AOCL_ROOT, an error is returned.