Questions tagged [stride]

The stride of an array is the number of locations in memory between beginnings of successive array elements, measured in bytes or in units of the size of the array's elements. Arrays may have a stride larger than their elements' width in bytes, which are called a non-unit stride. One particular use of non-unit stride is for images, when creating subimages without copying the pixel data.

The stride of an array is the number of locations in memory between beginnings of successive array elements, measured in bytes or in units of the size of the array's elements. Arrays may have a stride larger than their elements' width in bytes, which are called a non-unit stride. One particular use of non-unit stride is for images, when creating subimages without copying the pixel data.

157 questions
0
votes
1 answer

padding numpy strides on left and right side

I wrote (with a little help from SO) a function to extract sliding windows with overlap L from a serie a, filling with fillval either on the right or left when L/(L-overlap) is not integer,using numpy strides: def strided_axis0_overlap(a, fillval,…
00__00__00
  • 4,834
  • 9
  • 41
  • 89
0
votes
2 answers

Alternative Stride integration with Jira and Confluence servers

Atlassian Stride is aiming to forcefully replace HipChat product. However, its current version (1.8.18) lacks out of the box the integration with self-hosted Jira and Confluence as they were in HipChat (though having a way to integrate with Jira…
Vladimir Salin
  • 2,951
  • 2
  • 36
  • 49
0
votes
1 answer

Strange Eigen map behavior with zero stride

From Eigen::Stride docs: The inner stride is the pointer increment between two consecutive entries within a given row of a row-major matrix or within a given column of a column-major matrix. The outer stride is the pointer increment between two…
Brans Ds
  • 4,039
  • 35
  • 64
0
votes
1 answer

Swift 3 sorting large amounts of data in arrays

I have an array of strings with a large amount of data, only some of which I want. I'm separating the good data using a separator like: var result = contentArray[1].components(separatedBy: ",") This leaves me with garbage data in even number…
froggomad
  • 1,747
  • 2
  • 17
  • 40
0
votes
4 answers

Swift 2.2 decrementing specific for loop in Swift 3

I have the task to refactor an iOS app to Swift 3. However, there is a for loop, in C-style, that does more than just looping an array backwards (it's mandatory to be backwards). This is a sample code. The principle is the same. let array =…
user3352185
  • 87
  • 1
  • 10
0
votes
1 answer

why tensorflow missing the only attribute "tf.strided_slice"?

I tested many functions in tensorflow module, and the tf.strided_slice is the only attribute missing... Could someone please tell me what's going on?? thanks! the screenshot is at the following link. screenshot of the missing attribute
kui ye
  • 3
  • 3
0
votes
1 answer

Strided copy between HOST and DEVICE clEnqueueWriteBufferRect

I search for a means to transfer data from two HOST buffers into a single DEVICE buffer in the following strided way: Below are the two host buffers Host_buffer_1 = [0 5] // copy to device with a stride equals to 5 Host_buffer_2 = [1 2 3 4 6 7 8 9]…
Algernon2
  • 23
  • 5
0
votes
2 answers

The effect of transposing a numpy array on its strides and data buffer

Suppose you are given a numpy array x = np.array([[1,2],[3,4]], dtype=np.int8) and let's take its transpose. y = x.T My understanding from the numpy documetnation has been that tranpose only modifies the strides of the array, and not its…
D R
  • 21,936
  • 38
  • 112
  • 149
0
votes
1 answer

What is the purpose of padding on rows of bitmap image data (Stride - Width)?

I could understand if it was being used for some sort of metadata, but I can't find anything confirming this. Is there a reason for this added padding? If so, what is it?
user3495690
  • 576
  • 3
  • 15
0
votes
0 answers

Specify the memory stride data when storing a buffer via HDF5’s C/C++ API

I’ve used HDF5 from Python, via h5py, quite a bit – I am spoiled by its smooth integration with NumPy. Now, from C/C++-land, I am trying to save and load image data in HDF5 stores, and I am having trouble figuring out how to specify the stride of…
fish2000
  • 4,289
  • 2
  • 37
  • 76
0
votes
1 answer

Finding the appropriate stride for TLB misses in an array in a code snippet

Assume the system has a 32-entry TLB with a 8KB page size. What should MAX and stride be set to in order achieve a TLB miss upon pretty much every access to the array "data" ? int value=0; int data[MAX]; for (int j;j <1000; j++) { for (int i =0,…
Mona Jalal
  • 34,860
  • 64
  • 239
  • 408
0
votes
0 answers

How to correctly submit data with stride parameter

i'm trying to render some mesh with a single texture on it, and the result is weird maybe because the stride parameter of the UVs data are incorrects. i have omitted glGenBuffers and binding calls. i have data packed in this manner: float…
freesoft
  • 57
  • 7
0
votes
0 answers

Fortran FFTW with strides ''Matlab-like''

I am a newbie in fortran, and trying to transform my matlab code efficiently to .f I am using the fftw3 package and need ffts with strides complex to complex. e.g. 2 dimensions out of 3d array should be transformed. What I do in matlab is…
user2375049
  • 350
  • 2
  • 15
0
votes
2 answers

slice/stride by variable?

background I'm attempting to code a basic letter game in python. In the game, the computer moderator picks a word out of a list of possible words. Each player (computer AI and human) is shown a series of blanks, one for each letter of the word. Each…
jamyn
  • 1,683
  • 3
  • 15
  • 13
-1
votes
2 answers

How to reset variable of seed on loop using stride with Swift?

I want to reset the variable (seed) on loop using stride with Swift. I have this code perfectly working on C# for (int i = 0; i <= 10; i++) { //something i = 0; //restart this value when necessary } And I'm trying this with swift for var…
Adrian
  • 197
  • 1
  • 8
1 2 3
10
11