Skip to content

Flat indexing #1

@LeandroMartinsdS

Description

@LeandroMartinsdS

Using flat indexing might improve performance and make it less convoluted.

Example

#define ROWS 100
#define COLS 100

for (int k = 0; k < ROWS * COLS; k++) {
    int i = k / COLS;
    int j = k % COLS;
    do_something(i, j);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions