contiguous Questions

8

Solved

What does x.contiguous() do for a tensor x?
Excel asked 21/2, 2018 at 21:30

1

Solved

C++11 introduced std::begin(std::valarray&) as well as std::end(std::valarray&). C++17 introduced std::data() which works with std::vector, std::array, C-style arrays, etc. But why wasn't a...
Hyperextension asked 6/2, 2021 at 0:46

3

Solved

C++20 has explicit library support for std::contiguous_iterator_tag. Some STL algorithms (e.g. std::copy) can perform much better on contiguous iterators. However, I'm unclear on exactly how the pr...
Marshallmarshallese asked 14/1, 2021 at 1:20

1

Solved

Yes, I will ultimately be using this for DMA but lets leave coherency aside for the moment. I have 64 bit BAR registers, therefore, AFAIK, all of RAM (e.g. higher than 4G) is available for DMA. I a...
Loleta asked 8/6, 2019 at 16:21

2

Solved

How can I find out if a n-dimensional numpy array Arr is contiguous in C-style or Fortran-style?
Mclean asked 12/7, 2018 at 11:12

5

Solved

I read that std::vector should be contiguous. My understanding is, that its elements should be stored together, not spread out across the memory. I have simply accepted the fact and used this knowl...
Pledgee asked 14/9, 2018 at 10:24

1

Solved

The specialisation of std::vector<bool>, as specified in C++11 23.3.7/1, doesn't declare a data() member (e.g. mentioned here and here). The question is: Why does a std::vector<bool> h...
Mahon asked 8/9, 2017 at 11:39

1

When we use new ArrayList() is memory contiguously allocated? If we call list.add(e) 10 times, will all elements be contiguously stored in memory by add order, or will they be randomly stored in me...
Guaco asked 30/1, 2017 at 5:33

3

Solved

I currently have the following function to read an array or a vector of raw data (_readStream is a std::ifstream) : template<typename IteratorType> inline bool MyClass::readRawData( const ...
Pilau asked 30/9, 2012 at 3:28

2

Solved

How would one go about creating a custom MemoryManager to manage a given, contiguous chunk of memory without the aid of other memory managers (such as Malloc/New) in C++? Here's some more context:...
Blockade asked 16/10, 2014 at 4:20

1

Solved

I have two questions for the following code: 1) Will the elements of faces be contiguous? 2) Does std::vector copy or move Face f when inserting it? #include <vector> int main() { struct ...
Laughter asked 21/6, 2014 at 22:0

6

I just discovered that there are some tree based data structure that, when looking for high performance, are often times stored as a contiguous chunk of memory, this is especially popular when usin...
Tenishatenn asked 13/6, 2014 at 17:26

2

Solved

I'm wondering if the arrays a[] and b[] in the code below are contiguous in memory: int main() { int a[3]; int b[3]; return 0; } a[0],a[1] and a[2] should be contiguous and the same for b, but...
Treiber asked 22/1, 2014 at 16:6

1

I'm reading Operating System Concepts Essentials 8th edition. When the author goes over contiguous memory allocation and worst fit the author states: "Allocate the largest hole. Again, we must...
Wake asked 27/3, 2013 at 0:39

3

Solved

Here is the case: var stringExample = "hello=goodbye==hello"; var parts = stringExample.split("="); Output: hello,goodbye,,hello I need this Output: hello,goodbye==hello Contiguous / repea...
Pericycle asked 8/1, 2013 at 14:44

1

Solved

Is there a regex that would work with String.split() to break a String into contiguous characters - ie split where the next character is different to the previous character? Here's the test case: ...
Christychristye asked 28/11, 2012 at 1:46

3

Possible Duplicate: Are std::vector elements guaranteed to be contiguous? I have come across a technique in which people use a vector in C++ to receive or send data for MPI operations...
Propound asked 30/9, 2011 at 10:36

2

Solved

Is the memory in std::array contiguous? Is the following valid/good practice? std::array<type1,Num> arr = //initialize value type1 * ptr = &arr[0]; Could I then pass ptr to functions e...
Gamone asked 9/7, 2011 at 5:17

6

Solved

I know that the standard does not force std::vector to allocate contiguous memory blocks, but all implementations obey this nevertheless. Suppose I wish to create a vector of a multidimensional, s...
Wershba asked 24/6, 2011 at 8:19

3

Solved

Background (Input) The Global Historical Climatology Network has flagged invalid or erroneous data in its collection of weather measurements. After removing these elements, there are swaths of dat...
Bloodletting asked 5/5, 2011 at 23:2
1

© 2022 - 2024 — McMap. All rights reserved.