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
35 changes: 22 additions & 13 deletions CMakeModules/CPackConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,27 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

INCLUDE("${CMAKE_MODULE_PATH}/Version.cmake")

OPTION(CREATE_STGZ "Create .sh install file" ON)
MARK_AS_ADVANCED(CREATE_STGZ)

# CPack package generation
#SET(CPACK_GENERATOR "TGZ;STGZ")
SET(CPACK_GENERATOR "STGZ")
# Create the following installers are as follows:
# Windows: Use external packaging, do nothing here
# OSX: Deploy as TGZ and STGZ
#IF("${CMAKE_SYSTEM}" MATCHES "Linux")
# # Linux: TGZ, STGZ, DEB
# SET(CPACK_GENERATOR "TGZ;STGZ;DEB;RPM")
#ENDIF()
IF(${CREATE_STGZ})
LIST(APPEND CPACK_GENERATOR "STGZ")
ENDIF()

OPTION(CREATE_DEB "Create .deb install file" OFF)
MARK_AS_ADVANCED(CREATE_DEB)

IF(${CREATE_DEB})
LIST(APPEND CPACK_GENERATOR "DEB")
ENDIF()

OPTION(CREATE_RPM "Create .rpm install file" OFF)
MARK_AS_ADVANCED(CREATE_RPM)

IF(${CREATE_RPM})
LIST(APPEND CPACK_GENERATOR "RPM")
ENDIF()

# Common settings to all packaging tools
SET(CPACK_PREFIX_DIR ${CMAKE_INSTALL_PREFIX})
Expand Down Expand Up @@ -59,16 +70,14 @@ SET(CPACK_COMPONENTS_ALL libraries headers documentation cmake)
# Debian package
##
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${PROCESSOR_ARCHITECTURE})
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libfreeimage-dev, libatlas3gf-base, libfftw3-dev, liblapacke-dev")
SET(CPACK_DEBIAN_PACKAGE_SUGGESTS "ocl-icd-libopencl1 (>= 2.0), nvidia-cuda-dev (>= 6.0)")

##
# RPM package
##
SET(CPACK_RPM_PACKAGE_LICENSE "BSD")
SET(CPACK_PACKAGE_GROUP "Development/Libraries")
SET(CPACK_RPM_PACKAGE_REQUIRES "freeimage atlas fftw lapack")
set(CPACK_RPM_PACKAGE_AUTOREQPROV " no")

SET(CPACK_PACKAGE_GROUP "Development/Libraries")
##
# Source package
##
Expand Down
4 changes: 2 additions & 2 deletions docs/details/data.dox
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ array/value is selected.

\brief Replace elements of an array based on an conditional array

If the condition array has an element as true, then the element is
replaced by the array/value, otherwise no change.
- Input values are retained when corresponding elements from condition array are true.
- Input values are replaced when corresponding elements from condition array are false.

\ingroup manip_mat
\ingroup arrayfire_func
Expand Down
32 changes: 20 additions & 12 deletions include/af/data.h
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,11 @@ namespace af

#if AF_API_VERSION >= 31
/**
\param[inout] a is the array whose values are replaced with values from \p b when \p cond is false
\param[in] cond is the conditional array
\param[in] b is the array containing elements which replace elements in \p a when \p cond is false
\param[inout] a is the input array
\param[in] cond is the conditional array.
\param[in] b is the replacement array.

\note Values of \p a are replaced with corresponding values of \p b, when \p cond is false.

\ingroup data_func_replace
*/
Expand All @@ -528,9 +530,11 @@ namespace af

#if AF_API_VERSION >= 31
/**
\param[inout] a is the array whose values are replaced with values from \p b when \p cond is false
\param[in] cond is the conditional array
\param[in] b is value that replaces elements in \p a when \p cond is false
\param[inout] a is the input array
\param[in] cond is the conditional array.
\param[in] b is the replacement value.

\note Values of \p a are replaced with corresponding values of \p b, when \p cond is false.

\ingroup data_func_replace
*/
Expand Down Expand Up @@ -836,9 +840,11 @@ extern "C" {

#if AF_API_VERSION >= 31
/**
\param[inout] a is the array whose values are replaced by \p b when \p cond is false
\param[in] cond is the conditional array
\param[in] b is the array containing elements that replaces elements of a where \p cond is false
\param[inout] a is the input array
\param[in] cond is the conditional array.
\param[in] b is the replacement array.

\note Values of \p a are replaced with corresponding values of \p b, when \p cond is false.

\ingroup data_func_replace
*/
Expand All @@ -847,9 +853,11 @@ extern "C" {

#if AF_API_VERSION >= 31
/**
\param[inout] a is the array whose values are replaced by \p b when \p cond is false
\param[in] cond is the conditional array
\param[in] b is the scalar that replaces the false parts of \p a
\param[inout] a is the input array
\param[in] cond is the conditional array.
\param[in] b is the replacement array.

\note Values of \p a are replaced with corresponding values of \p b, when \p cond is false.

\ingroup data_func_replace
*/
Expand Down