Skip to content

Commit

Permalink
Merge pull request #1026 from arrayfire/hotfixes-3.1.2
Browse files Browse the repository at this point in the history
Hotfixes 3.1.2
  • Loading branch information
umar456 committed Sep 25, 2015
2 parents 92e08e9 + 381e4ad commit 77128bb
Show file tree
Hide file tree
Showing 39 changed files with 370 additions and 224 deletions.
2 changes: 1 addition & 1 deletion CMakeModules/Version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
SET(AF_VERSION_MAJOR "3")
SET(AF_VERSION_MINOR "1")
SET(AF_VERSION_PATCH "1")
SET(AF_VERSION_PATCH "2")

SET(AF_VERSION "${AF_VERSION_MAJOR}.${AF_VERSION_MINOR}.${AF_VERSION_PATCH}")
SET(AF_API_VERSION_CURRENT ${AF_VERSION_MAJOR}${AF_VERSION_MINOR})
Expand Down
2 changes: 1 addition & 1 deletion CMakeModules/build_forge.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ENDIF()
ExternalProject_Add(
forge-ext
GIT_REPOSITORY https://github.com/arrayfire/forge.git
GIT_TAG af3.1
GIT_TAG af3.1.2
PREFIX "${prefix}"
INSTALL_DIR "${prefix}"
UPDATE_COMMAND ""
Expand Down
6 changes: 3 additions & 3 deletions CMakeModules/osx_install/cpu_scripts/postinstall
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e
set -o pipefail

err_file=/tmp/AFInstaller.err
err_file=/tmp/AFInstallerCPU.err
brew=/usr/local/bin/brew

if [ ! -f $brew ]; then
Expand All @@ -20,5 +20,5 @@ if [ -z $user ]; then
exit 1
fi

su $user -c "$brew tap homebrew/versions"
su $user -c "$brew install fftw glfw3 fontconfig"
su $user -c "$brew tap homebrew/versions" 2> $err_file
su $user -c "$brew install fftw glfw3 fontconfig" 2> $err_file
4 changes: 2 additions & 2 deletions CMakeModules/osx_install/cuda_scripts/postinstall
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ if [ -z $user ]; then
exit 1
fi

su $user -c "$brew tap homebrew/versions"
su $user -c "$brew install glfw3 fontconfig"
su $user -c "$brew tap homebrew/versions" 2> $err_file
su $user -c "$brew install glfw3 fontconfig" 2> $err_file
4 changes: 2 additions & 2 deletions CMakeModules/osx_install/opencl_scripts/postinstall
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ if [ -z $user ]; then
exit 1
fi

su $user -c "$brew tap homebrew/versions"
su $user -c "$brew install glfw3 fontconfig"
su $user -c "$brew tap homebrew/versions" 2> $err_file
su $user -c "$brew install glfw3 fontconfig" 2> $err_file
2 changes: 1 addition & 1 deletion docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ADD_CUSTOM_TARGET(docs
ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${AF_DOCS_CONFIG_OUT}
COMMAND cmake -E copy_directory ${ASSETS_DIR} ${CMAKE_CURRENT_BINARY_DIR}
COMMAND cmake -E remove_directory ${CMAKE_CURRENT_BINARY_DIR}/.git
COMMAND cmake -E remove ${CMAKE_CURRENT_BINARY_DIR}/.git
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating Documentation"
VERBATIM)
Expand Down
13 changes: 2 additions & 11 deletions docs/details/array.dox
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
\addtogroup arrayfire_func
@{
\defgroup array_mem_operator_paren operator()
\ingroup index_mat
\ingroup index_mat

\brief Gets a reference to a set of elements

Expand Down Expand Up @@ -92,7 +92,7 @@ Adds and assigns values
\defgroup array_mem_operator_minus_eq operator-=
\ingroup index_mat

\brief Substracts and assigns the value(s) of val to the elements of the
\brief Subtracts and assigns the value(s) of val to the elements of the
af::array

Substracts and assigns values
Expand All @@ -116,14 +116,5 @@ Multiplies and assigns values

Divides and assigns values

===============================================================================

\defgroup array_mem_operator_plus operator+
\ingroup arith_mat

\brief Divides and assigns the value(s) of val to the elements of the af::array

Divides and assigns values

@}
*/
32 changes: 15 additions & 17 deletions docs/pages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,24 +135,22 @@ If you wish to cite ArrayFire in an academic publication, please use the
following reference:

Formatted:
```
Yalamanchili, P., Arshad, U., Mohammed, Z., Garigipati, P., Entschev, P.,
Kloppenborg, B., Malcolm, James and Melonakos, J. (2015).
ArrayFire - A high performance software library for parallel computing with an
easy-to-use API. Atlanta: AccelerEyes. Retrieved from https://github.com/arrayfire/arrayfire
```

Yalamanchili, P., Arshad, U., Mohammed, Z., Garigipati, P., Entschev, P.,
Kloppenborg, B., Malcolm, James and Melonakos, J. (2015).
ArrayFire - A high performance software library for parallel computing with an
easy-to-use API. Atlanta: AccelerEyes. Retrieved from https://github.com/arrayfire/arrayfire

BibTeX:
```bibtex
@misc{Yalamanchili2015,
abstract = {ArrayFire is a high performance software library for parallel computing with an easy-to-use API. Its array based function set makes parallel programming simple. ArrayFire's multiple backends (CUDA, OpenCL and native CPU) make it platform independent and highly portable. A few lines of code in ArrayFire can replace dozens of lines of parallel computing code, saving you valuable time and lowering development costs.},
address = {Atlanta},
author = {Yalamanchili, Pavan and Arshad, Umar and Mohammed, Zakiuddin and Garigipati, Pradeep and Entschev, Peter and Kloppenborg, Brian and Malcolm, James and Melonakos, John},
publisher = {AccelerEyes},
title = {{ArrayFire - A high performance software library for parallel computing with an easy-to-use API}},
url = {https://github.com/arrayfire/arrayfire},
year = {2015}
}
```

@misc{Yalamanchili2015,
abstract = {ArrayFire is a high performance software library for parallel computing with an easy-to-use API. Its array based function set makes parallel programming simple. ArrayFire's multiple backends (CUDA, OpenCL and native CPU) make it platform independent and highly portable. A few lines of code in ArrayFire can replace dozens of lines of parallel computing code, saving you valuable time and lowering development costs.},
address = {Atlanta},
author = {Yalamanchili, Pavan and Arshad, Umar and Mohammed, Zakiuddin and Garigipati, Pradeep and Entschev, Peter and Kloppenborg, Brian and Malcolm, James and Melonakos, John},
publisher = {AccelerEyes},
title = {{ArrayFire - A high performance software library for parallel computing with an easy-to-use API}},
url = {https://github.com/arrayfire/arrayfire},
year = {2015}
}

ArrayFire development is funded by ArrayFire LLC and several third parties, please see the list of <a href="https://github.com/arrayfire/arrayfire/blob/master/ACKNOWLEDGEMENTS.md">acknowledgements</a>.
24 changes: 24 additions & 0 deletions docs/pages/release_notes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
Release Notes {#releasenotes}
==============

v3.1.2
==============

Bug Fixes
---------

* Fixed [bug](https://github.com/arrayfire/arrayfire/commit/4698f12) in assign that was causing test to fail
* Fixed bug in convolve. Frequency condition now depends on kernel size only
* Fixed [bug](https://github.com/arrayfire/arrayfire/issues/1005) in indexed reductions for complex type in OpenCL backend
* Fixed [bug](https://github.com/arrayfire/arrayfire/issues/1006) in kernel name generation in ireduce for OpenCL backend
* Fixed non-linear to linear indices in ireduce
* Fixed [bug](https://github.com/arrayfire/arrayfire/issues/1011) in reductions for small arrays
* Fixed [bug](https://github.com/arrayfire/arrayfire/issues/1010) in histogram for indexed arrays
* Fixed [compiler error](https://github.com/arrayfire/arrayfire/issues/1015) CPUID for non-compliant devices
* Fixed [failing tests](https://github.com/arrayfire/arrayfire/issues/1008) on i386 platforms
* Add missing AFAPI

Other
-------

* Documentation: Added missing examples and other corrections
* Documentation: Fixed warnings in documentation building
* Installers: Send error messages to log file in OSX Installer

v3.1.1
==============

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/using_on_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ for the CPU, OpenCL and CUDA backends repsectively).
Here is a minimial example MakeFile which uses ArrayFire's CPU backend:

LIBS=-lafcpu
LIB_PATHS=/usr/lib
LIB_PATHS=-L/usr/lib
INCLUDES=-I/usr/include
CC=g++ $(COMPILER_OPTIONS)
COMPILER_OPTIONS=-std=c++11 -g
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/using_on_osx.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ for the CPU, OpenCL and CUDA backends repsectively).
Here is a minimial example MakeFile which uses ArrayFire's CPU backend:

LIBS=-lafcpu
LIB_PATHS=/usr/lib
LIB_PATHS=-L/usr/lib
INCLUDES=-I/usr/include
CC=g++ $(COMPILER_OPTIONS)
COMPILER_OPTIONS=-std=c++11 -g
Expand Down
4 changes: 2 additions & 2 deletions include/af/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
typedef long long dim_t;
#endif

#if defined(__arm__) || defined(_M_ARM) || defined(_M_ARMT) || defined(_ARM) || defined(_TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || defined(__thumb__)
#define ARM_ARCH
#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86) || defined(_WIN64)
#define USE_CPUID
#endif

#include <stdlib.h>
Expand Down
6 changes: 3 additions & 3 deletions include/af/dim4.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ class AFAPI dim4
const dim_t* get() const { return dims; }
};

dim4 operator+(const dim4& first, const dim4& second);
dim4 operator-(const dim4& first, const dim4& second);
dim4 operator*(const dim4& first, const dim4& second);
AFAPI dim4 operator+(const dim4& first, const dim4& second);
AFAPI dim4 operator-(const dim4& first, const dim4& second);
AFAPI dim4 operator*(const dim4& first, const dim4& second);

static inline
std::ostream&
Expand Down
56 changes: 35 additions & 21 deletions include/arrayfire.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
@defgroup data_mat Functions to create arrays.
constant, random, range, etc.
@defgroup index_mat Indexing operation on arrays
@defgroup index_mat Assignment & Indexing operation on arrays
Access sub regions of an array object
@defgroup manip_mat Move and Reorder array content
Expand Down Expand Up @@ -234,36 +234,50 @@
*/

/**
\example helloworld.cpp
\example pi.cpp
\example integer.cpp
\example rainfall.cpp
\example vectorize.cpp
\example black_scholes_options.cpp
\example monte_carlo_options.cpp
\example heston_model.cpp
\example matching.cpp
\example fast.cpp
\example harris.cpp
\example kmeans.cpp
\example knn.cpp
\example bagging.cpp
\example naive_bayes.cpp
\example susan.cpp
\example logistic_regression.cpp
\example rbm.cpp
\example perceptron.cpp
\example neural_network.cpp
\example rbm.cpp
\example bagging.cpp
\example naive_bayes.cpp
\example deep_belief_net.cpp
\example logistic_regression.cpp
\example kmeans.cpp
\example softmax_regression.cpp
\example knn.cpp
\example monte_carlo_options.cpp
\example heston_model.cpp
\example black_scholes_options.cpp
\example blas.cpp
\example fft.cpp
\example pi.cpp
\example svd.cpp
\example cholesky.cpp
\example qr.cpp
\example lu.cpp
\example conway.cpp
\example conway_pretty.cpp
\example fractal.cpp
\example histogram.cpp
\example fractal.cpp
\example plot2d.cpp
\example brain_segmentation.cpp
\example image_demo.cpp
\example image_editing.cpp
\example conway_pretty.cpp
\example helloworld.cpp
\example vectorize.cpp
\example integer.cpp
\example convolve.cpp
\example rainfall.cpp
\example morphing.cpp
\example optical_flow.cpp
\example image_demo.cpp
\example brain_segmentation.cpp
\example pyramids.cpp
\example binary_thresholding.cpp
\example optical_flow.cpp
\example adaptive_thresholding.cpp
\example image_editing.cpp
\example edge.cpp
\example filters.cpp
*/

#include "af/compatible.h"
Expand Down
2 changes: 1 addition & 1 deletion src/api/c/assign.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ af_err af_assign_gen(af_array *out,
ARG_ASSERT(2, (ndims == 1) || (ndims == (dim_t)lInfo.ndims()));

if (ndims == 1 && ndims != (dim_t)lInfo.ndims()) {
af_array tmp_in, tmp_out;
af_array tmp_in = 0, tmp_out = 0;
AF_CHECK(af_flat(&tmp_in, lhs));
AF_CHECK(af_assign_gen(&tmp_out, tmp_in, ndims, indexs, rhs_));
AF_CHECK(af_moddims(out, tmp_out, lInfo.ndims(), lInfo.dims().get()));
Expand Down
44 changes: 23 additions & 21 deletions src/api/c/convolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ bool isFreqDomain(const af_array &signal, const af_array filter, af_conv_domain

if (identifyBatchKind<baseDim>(sdims, fdims) == CONVOLVE_BATCH_DIFF) return true;

int batch = 1;
int kbatch = 1;
for(int i = 3; i >= baseDim; i--) {
batch *= std::max(fdims[i], sdims[i]);
kbatch *= fdims[i];
}

if (batch >= 10) return true;
if (kbatch >= 10) return true;

if (baseDim == 1) {
if (fdims[0] > 128) return true;
Expand All @@ -177,44 +177,46 @@ af_err af_convolve1(af_array *out, const af_array signal, const af_array filter,
try {
if (isFreqDomain<1>(signal, filter, domain))
return af_fft_convolve1(out, signal, filter, mode);
} CATCHALL;

if (mode == AF_CONV_EXPAND)
if (mode == AF_CONV_EXPAND)
return convolve<1, true >(out, signal, filter);
else
return convolve<1, false>(out, signal, filter);
else
return convolve<1, false>(out, signal, filter);
} CATCHALL;
}

af_err af_convolve2(af_array *out, const af_array signal, const af_array filter, const af_conv_mode mode, af_conv_domain domain)
{
try {
if (isFreqDomain<2>(signal, filter, domain))
return af_fft_convolve2(out, signal, filter, mode);
} CATCHALL;

if (mode == AF_CONV_EXPAND)
return convolve<2, true >(out, signal, filter);
else
return convolve<2, false>(out, signal, filter);
if (mode == AF_CONV_EXPAND)
return convolve<2, true >(out, signal, filter);
else
return convolve<2, false>(out, signal, filter);
} CATCHALL;
}

af_err af_convolve3(af_array *out, const af_array signal, const af_array filter, const af_conv_mode mode, af_conv_domain domain)
{
try {
if (isFreqDomain<3>(signal, filter, domain))
return af_fft_convolve3(out, signal, filter, mode);
} CATCHALL;

if (mode == AF_CONV_EXPAND)
return convolve<3, true >(out, signal, filter);
else
return convolve<3, false>(out, signal, filter);
if (mode == AF_CONV_EXPAND)
return convolve<3, true >(out, signal, filter);
else
return convolve<3, false>(out, signal, filter);
} CATCHALL;
}

af_err af_convolve2_sep(af_array *out, const af_array signal, const af_array col_filter, const af_array row_filter, const af_conv_mode mode)
{
if (mode == AF_CONV_EXPAND)
return convolve2_sep<true >(out, signal, col_filter, row_filter);
else
return convolve2_sep<false>(out, signal, col_filter, row_filter);
try {
if (mode == AF_CONV_EXPAND)
return convolve2_sep<true >(out, signal, col_filter, row_filter);
else
return convolve2_sep<false>(out, signal, col_filter, row_filter);
} CATCHALL;
}

0 comments on commit 77128bb

Please sign in to comment.