Oct
13
comment How to initialize vector from array without allocating more storage space?
I think this is perfect for my use case. As others suggested, I will also look into smart pointers. and supports no operations that would result in resizing or re-allocating That is perfectly fine with me.
Oct
13
accepted How to initialize vector from array without allocating more storage space?
Oct
13
revised How to initialize vector from array without allocating more storage space?
added 175 characters in body
Oct
13
awarded Editor
Oct
13
comment How to initialize vector from array without allocating more storage space?
@Slava Could you please elaborate? I think it might be worth the effort in my case.
Oct
13
comment How to initialize vector from array without allocating more storage space?
@juanchopanza The function getArray() is not really written by me. I would have personally preferred to deal with vectors completely but I am using a library function. After I get the data, I want to use vector functions on data pointed to by array so I need to initialize a vector for it. Although I am doing that currently, I want to improve the efficiency since the data is a bit large.
Oct
13
comment How to initialize vector from array without allocating more storage space?
@PaulMcKenzie I expect the data to be removed. In short, I want the data to be handled by the vector functions completely. In essence, I want to just transport all the data from array and fit it in vec.data().
Oct
13
asked How to initialize vector from array without allocating more storage space?
Oct
13
accepted Residue calculation using CUDA Thrust
Aug
9
accepted How do I get OpenCL C++ bindings on Mac OSX 10.9.4 for Intel Iris Pro
Aug
9
comment How do I get OpenCL C++ bindings on Mac OSX 10.9.4 for Intel Iris Pro
I copied cl.hpp to /System/Library/Frameworks/OpenCL.framework/ Compiling it with "g++ -o exec prog.cpp -framework OpenCL" does not work but it works with "clang++ -o exec prog.cpp -framework OpenCL". Is there any reason why this happens? What am I losing by not being able to use g++? Anyway, I will be using clang++ to do OpenCL coding on OSX for now. Thanks.
Aug
7
asked How do I get OpenCL C++ bindings on Mac OSX 10.9.4 for Intel Iris Pro
May
11
asked Residue calculation using CUDA Thrust
May
8
awarded Supporter
May
6
awarded Supporter
May
6
awarded Scholar
May
6
awarded Custodian
May
6
reviewed Approve suggested edit on Range for loop doesn't work when operating with an indexed element
May
6
comment Range for loop doesn't work when operating with an indexed element
Now why didn't I think of that. Thanks. That answers my question.
May
6
accepted Range for loop doesn't work when operating with an indexed element
1 2 3