Skip to content

Commit

Permalink
adds space between consecuative right angular brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikcfd committed Jan 2, 2019
1 parent eb66115 commit 61b5c27
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 37 deletions.
10 changes: 5 additions & 5 deletions viennacl/backend/memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ namespace backend
* @param dst_offset Offset of the first byte to be written to the address given by 'dst_buffer' (in bytes)
* @param bytes_to_copy Number of bytes to be copied
*/
template <typename H = viennacl::ocl::handle<cl_mem>>
template <typename H = viennacl::ocl::handle<cl_mem> >
inline void memory_copy(mem_handle<H> const & src_buffer,
mem_handle<H> & dst_buffer,
vcl_size_t src_offset,
Expand Down Expand Up @@ -207,7 +207,7 @@ namespace backend
/** @brief A 'shallow' copy operation from an initialized buffer to an uninitialized buffer.
* The uninitialized buffer just copies the raw handle.
*/
template <typename H = viennacl::ocl::handle<cl_mem>>
template <typename H = viennacl::ocl::handle<cl_mem> >
inline void memory_shallow_copy(mem_handle<H> const & src_buffer,
mem_handle<H> & dst_buffer)
{
Expand Down Expand Up @@ -251,7 +251,7 @@ namespace backend
* @param ptr Pointer to the first byte to be written
* @param async Whether the operation should be asynchronous
*/
template <typename H = viennacl::ocl::handle<cl_mem>>
template <typename H = viennacl::ocl::handle<cl_mem> >
inline void memory_write(mem_handle<H> & dst_buffer,
vcl_size_t dst_offset,
vcl_size_t bytes_to_write,
Expand Down Expand Up @@ -400,7 +400,7 @@ namespace backend


/** @brief Switches the active memory domain within a memory handle. Data is copied if the new active domain differs from the old one. Memory in the source handle is not free'd. */
template<typename DataType, typename H = viennacl::ocl::handle<cl_mem>>
template<typename DataType, typename H = viennacl::ocl::handle<cl_mem> >
void switch_memory_context(mem_handle<H> & handle, viennacl::context new_ctx)
{
if (handle.get_active_handle_id() == new_ctx.memory_type())
Expand Down Expand Up @@ -502,7 +502,7 @@ namespace backend


/** @brief Copies data of the provided 'DataType' from 'handle_src' to 'handle_dst' and converts the data if the binary representation of 'DataType' among the memory domains differs. */
template<typename DataType, typename H = viennacl::ocl::handle<cl_mem>>
template<typename DataType, typename H = viennacl::ocl::handle<cl_mem> >
void typesafe_memory_copy(mem_handle<H> const & handle_src, mem_handle<H> & handle_dst)
{
if (handle_dst.get_active_handle_id() == MEMORY_NOT_INITIALIZED)
Expand Down
12 changes: 6 additions & 6 deletions viennacl/backend/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class typesafe_host_array
public:
explicit typesafe_host_array() : bytes_buffer_(NULL), buffer_size_(0) {}

template <typename H = viennacl::ocl::handle<cl_mem>>
template <typename H = viennacl::ocl::handle<cl_mem> >
explicit typesafe_host_array(mem_handle<H> const & handle, vcl_size_t num = 0) : bytes_buffer_(NULL), buffer_size_(sizeof(cpu_type) * num)
{
resize(handle, num);
Expand All @@ -123,7 +123,7 @@ class typesafe_host_array
//

/** @brief Resize without initializing the new memory */
template <typename H = viennacl::ocl::handle<cl_mem>>
template <typename H = viennacl::ocl::handle<cl_mem> >
void raw_resize(mem_handle<H> const & /*handle*/, vcl_size_t num)
{
buffer_size_ = sizeof(cpu_type) * num;
Expand All @@ -137,7 +137,7 @@ class typesafe_host_array
}

/** @brief Resize including initialization of new memory (cf. std::vector<>) */
template <typename H = viennacl::ocl::handle<cl_mem>>
template <typename H = viennacl::ocl::handle<cl_mem> >
void resize(mem_handle<H> const & handle, vcl_size_t num)
{
raw_resize(handle, num);
Expand Down Expand Up @@ -174,7 +174,7 @@ class typesafe_host_array<T, true>
public:
explicit typesafe_host_array() : convert_to_opencl_( (default_memory_type() == OPENCL_MEMORY) ? true : false), bytes_buffer_(NULL), buffer_size_(0) {}

template <typename H = viennacl::ocl::handle<cl_mem>>
template <typename H = viennacl::ocl::handle<cl_mem> >
explicit typesafe_host_array(mem_handle<H> const & handle, vcl_size_t num = 0) : convert_to_opencl_(false), bytes_buffer_(NULL), buffer_size_(sizeof(cpu_type) * num)
{
resize(handle, num);
Expand Down Expand Up @@ -224,7 +224,7 @@ class typesafe_host_array<T, true>
//

/** @brief Resize without initializing the new memory */
template <typename H = viennacl::ocl::handle<cl_mem>>
template <typename H = viennacl::ocl::handle<cl_mem> >
void raw_resize(mem_handle<H> const & handle, vcl_size_t num)
{
buffer_size_ = sizeof(cpu_type) * num;
Expand All @@ -251,7 +251,7 @@ class typesafe_host_array<T, true>
}

/** @brief Resize including initialization of new memory (cf. std::vector<>) */
template <typename H = viennacl::ocl::handle<cl_mem>>
template <typename H = viennacl::ocl::handle<cl_mem> >
void resize(mem_handle<H> const & handle, vcl_size_t num)
{
raw_resize(handle, num);
Expand Down
16 changes: 8 additions & 8 deletions viennacl/forwards.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,25 +257,25 @@ namespace viennacl
}

//forward declaration of basic types:
template<class TYPE, typename H = viennacl::ocl::handle<cl_mem>>
template<class TYPE, typename H = viennacl::ocl::handle<cl_mem> >
class scalar;

template<typename LHS, typename RHS, typename OP>
class scalar_expression;

template<typename SCALARTYPE, typename H = viennacl::ocl::handle<cl_mem>>
template<typename SCALARTYPE, typename H = viennacl::ocl::handle<cl_mem> >
class entry_proxy;

template<typename SCALARTYPE, typename H = viennacl::ocl::handle<cl_mem>>
template<typename SCALARTYPE, typename H = viennacl::ocl::handle<cl_mem> >
class const_entry_proxy;

template<typename LHS, typename RHS, typename OP>
class vector_expression;

template<class SCALARTYPE, unsigned int ALIGNMENT, typename OCLHandle = viennacl::ocl::handle<cl_mem>>
template<class SCALARTYPE, unsigned int ALIGNMENT, typename OCLHandle = viennacl::ocl::handle<cl_mem> >
class vector_iterator;

template<class SCALARTYPE, unsigned int ALIGNMENT, typename OCLHandle = viennacl::ocl::handle<cl_mem>>
template<class SCALARTYPE, unsigned int ALIGNMENT, typename OCLHandle = viennacl::ocl::handle<cl_mem> >
class const_vector_iterator;

template<typename SCALARTYPE>
Expand All @@ -296,10 +296,10 @@ namespace viennacl
template<class SCALARTYPE, typename Handle = viennacl::ocl::handle<cl_mem>, typename SizeType = vcl_size_t, typename DistanceType = vcl_ptrdiff_t>
class vector_base;

template<class SCALARTYPE, unsigned int ALIGNMENT = 1, typename OCLHandle = viennacl::ocl::handle<cl_mem>>
template<class SCALARTYPE, unsigned int ALIGNMENT = 1, typename OCLHandle = viennacl::ocl::handle<cl_mem> >
class vector;

template<typename ScalarT, typename H = viennacl::ocl::handle<cl_mem>>
template<typename ScalarT, typename H = viennacl::ocl::handle<cl_mem> >
class vector_tuple;

//the following forwards are needed for GMRES
Expand Down Expand Up @@ -386,7 +386,7 @@ namespace viennacl

namespace backend
{
template <typename OCL_Handle = viennacl::ocl::handle<cl_mem>>
template <typename OCL_Handle = viennacl::ocl::handle<cl_mem> >
class mem_handle;
}

Expand Down
2 changes: 1 addition & 1 deletion viennacl/traits/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ viennacl::context context(T const & t)
}

/** @brief Returns an ID for the currently active memory domain of an object */
template <typename H = viennacl::ocl::handle<cl_mem>>
template <typename H = viennacl::ocl::handle<cl_mem> >
inline viennacl::context context(viennacl::backend::mem_handle<H> const & h)
{
#ifdef VIENNACL_WITH_OPENCL
Expand Down
34 changes: 17 additions & 17 deletions viennacl/traits/handle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,59 +58,59 @@ inline long handle(long val) { return val; } //for unification purposes whe
inline float handle(float val) { return val; } //for unification purposes when passing CPU-scalars to kernels
inline double handle(double val) { return val; } //for unification purposes when passing CPU-scalars to kernels

template<typename LHS, typename RHS, typename OP, typename H = viennacl::ocl::handle<cl_mem>>
template<typename LHS, typename RHS, typename OP, typename H = viennacl::ocl::handle<cl_mem> >
viennacl::backend::mem_handle<H> & handle(viennacl::scalar_expression< const LHS, const RHS, OP> & obj)
{
return handle(obj.lhs());
}

template<typename LHS, typename RHS, typename OP, typename H = viennacl::ocl::handle<cl_mem>>
template<typename LHS, typename RHS, typename OP, typename H = viennacl::ocl::handle<cl_mem> >
viennacl::backend::mem_handle<H> const & handle(viennacl::matrix_expression<LHS, RHS, OP> const & obj);

template<typename LHS, typename RHS, typename OP, typename H = viennacl::ocl::handle<cl_mem>>
template<typename LHS, typename RHS, typename OP, typename H = viennacl::ocl::handle<cl_mem> >
viennacl::backend::mem_handle<H> const & handle(viennacl::vector_expression<LHS, RHS, OP> const & obj);

template<typename LHS, typename RHS, typename OP, typename H = viennacl::ocl::handle<cl_mem>>
template<typename LHS, typename RHS, typename OP, typename H = viennacl::ocl::handle<cl_mem> >
viennacl::backend::mem_handle<H> const & handle(viennacl::scalar_expression< const LHS, const RHS, OP> const & obj)
{
return handle(obj.lhs());
}

// proxy objects require extra care (at the moment)
template<typename T, typename H = viennacl::ocl::handle<cl_mem>>
template<typename T, typename H = viennacl::ocl::handle<cl_mem> >
viennacl::backend::mem_handle<H> & handle(viennacl::vector_base<T> & obj)
{
return obj.handle();
}

template<typename T, typename H = viennacl::ocl::handle<cl_mem>>
template<typename T, typename H = viennacl::ocl::handle<cl_mem> >
viennacl::backend::mem_handle<H> const & handle(viennacl::vector_base<T> const & obj)
{
return obj.handle();
}



template<typename T, typename H = viennacl::ocl::handle<cl_mem>>
template<typename T, typename H = viennacl::ocl::handle<cl_mem> >
viennacl::backend::mem_handle<H> & handle(viennacl::matrix_range<T> & obj)
{
return obj.get().handle();
}

template<typename T, typename H = viennacl::ocl::handle<cl_mem>>
template<typename T, typename H = viennacl::ocl::handle<cl_mem> >
viennacl::backend::mem_handle<H> const & handle(viennacl::matrix_range<T> const & obj)
{
return obj.get().handle();
}


template<typename T, typename H = viennacl::ocl::handle<cl_mem>>
template<typename T, typename H = viennacl::ocl::handle<cl_mem> >
viennacl::backend::mem_handle<H> & handle(viennacl::matrix_slice<T> & obj)
{
return obj.get().handle();
}

template<typename T, typename H = viennacl::ocl::handle<cl_mem>>
template<typename T, typename H = viennacl::ocl::handle<cl_mem> >
viennacl::backend::mem_handle<H> const & handle(viennacl::matrix_slice<T> const & obj)
{
return obj.get().handle();
Expand All @@ -122,13 +122,13 @@ viennacl::backend::mem_handle<H> const & handle(viennacl::vector_expression<LHS,
return handle(obj.lhs());
}

template<typename RHS, typename OP, typename H = viennacl::ocl::handle<cl_mem>>
template<typename RHS, typename OP, typename H = viennacl::ocl::handle<cl_mem> >
viennacl::backend::mem_handle<H> const & handle(viennacl::vector_expression<const float, RHS, OP> const & obj)
{
return handle(obj.rhs());
}

template<typename RHS, typename OP, typename H = viennacl::ocl::handle<cl_mem>>
template<typename RHS, typename OP, typename H = viennacl::ocl::handle<cl_mem> >
viennacl::backend::mem_handle<H> const & handle(viennacl::vector_expression<const double, RHS, OP> const & obj)
{
return handle(obj.rhs());
Expand All @@ -140,13 +140,13 @@ viennacl::backend::mem_handle<H> const & handle(viennacl::matrix_expression<LHS,
return handle(obj.lhs());
}

template<typename RHS, typename OP, typename H = viennacl::ocl::handle<cl_mem>>
template<typename RHS, typename OP, typename H = viennacl::ocl::handle<cl_mem> >
viennacl::backend::mem_handle<H> const & handle(viennacl::matrix_expression<const float, RHS, OP> const & obj)
{
return handle(obj.rhs());
}

template<typename RHS, typename OP, typename H = viennacl::ocl::handle<cl_mem>>
template<typename RHS, typename OP, typename H = viennacl::ocl::handle<cl_mem> >
viennacl::backend::mem_handle<H> const & handle(viennacl::matrix_expression<const double, RHS, OP> const & obj)
{
return handle(obj.rhs());
Expand All @@ -158,14 +158,14 @@ viennacl::backend::mem_handle<H> const & handle(viennacl::matrix_expression<cons
// RAM handle extraction
//
/** @brief Generic helper routine for extracting the RAM handle of a ViennaCL object. Non-const version. */
template<typename T, typename H = viennacl::ocl::handle<cl_mem>>
template<typename T, typename H = viennacl::ocl::handle<cl_mem> >
typename viennacl::backend::mem_handle<H>::ram_handle_type & ram_handle(T & obj)
{
return viennacl::traits::handle(obj).ram_handle();
}

/** @brief Generic helper routine for extracting the RAM handle of a ViennaCL object. Const version. */
template<typename T, typename H = viennacl::ocl::handle<cl_mem>>
template<typename T, typename H = viennacl::ocl::handle<cl_mem> >
typename viennacl::backend::mem_handle<H>::ram_handle_type const & ram_handle(T const & obj)
{
return viennacl::traits::handle(obj).ram_handle();
Expand All @@ -178,7 +178,7 @@ inline viennacl::tools::shared_ptr<char> & ram_handle(viennacl::backend::mem_han
return h.ram_handle();
}

template <typename H = viennacl::ocl::handle<cl_mem>>
template <typename H = viennacl::ocl::handle<cl_mem> >
inline viennacl::tools::shared_ptr<char> const & ram_handle(viennacl::backend::mem_handle<H> const & h)
{
return h.ram_handle();
Expand Down

0 comments on commit 61b5c27

Please sign in to comment.