소스 검색

examples/cpp/add_vectors_interface.cpp: remove keyword explicit for the allocator constructor taking an allocator parameter, it fails on MacOS

Nathalie Furmento 7 년 전
부모
커밋
51efc84730
1개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  1. 8 8
      examples/cpp/add_vectors_interface.cpp

+ 8 - 8
examples/cpp/add_vectors_interface.cpp

@@ -52,12 +52,12 @@ class my_allocator
 		this->node = STARPU_MAIN_RAM;
 	}
 
-	explicit my_allocator(const my_allocator& a) 
+	my_allocator(const my_allocator& a)
 	{
 		node = a.get_node();
 	}
 
-	explicit my_allocator(const unsigned node) 
+	explicit my_allocator(const unsigned node)
 	{
 		this->node = node;
 	}
@@ -70,10 +70,10 @@ class my_allocator
 
 	void      deallocate(void* p, size_type n)
 	{
-		if (p) 
+		if (p)
 		{
 			starpu_free_on_node(this->node, (uintptr_t) p, n * sizeof(T));
-		} 
+		}
 	}
 
 	unsigned get_node() const
@@ -81,12 +81,12 @@ class my_allocator
 		return node;
 	}
 
-	pointer address(reference x) const 
+	pointer address(reference x) const
 	{
 		return &x;
 	}
 
-	const_pointer address(const_reference x) const 
+	const_pointer address(const_reference x) const
 	{
 		return &x;
 	}
@@ -97,7 +97,7 @@ class my_allocator
 		return *this;
 	}
 
-	void construct(pointer p, const T& val) 
+	void construct(pointer p, const T& val)
 	{
 		new ((T*) p) T(val);
 	}
@@ -538,7 +538,7 @@ void cpu_kernel_add_vectors(void *buffers[], void *cl_arg)
 {
 	std::vector<MY_TYPE>* vec_A = VECTOR_CPP_GET_VEC(buffers[0]);
 	std::vector<MY_TYPE>* vec_B = VECTOR_CPP_GET_VEC(buffers[1]);
-	std::vector<MY_TYPE>* vec_C = VECTOR_CPP_GET_VEC(buffers[2]); 
+	std::vector<MY_TYPE>* vec_C = VECTOR_CPP_GET_VEC(buffers[2]);
 
 	// all the std::vector have to have the same size
 	assert(vec_A->size() == vec_B->size() && vec_B->size() == vec_C->size());