Monado OpenXR Runtime
m_permutation.c File Reference

Code to generate permutation of indices. More...

#include "util/u_misc.h"
#include "util/u_logging.h"
#include "m_permutation.h"
#include <stdio.h>
Include dependency graph for m_permutation.c:

Functions

static void swap (uint32_t *array, uint32_t a, uint32_t b)
 
static void copy (struct m_permutator *mp, uint32_t *out_elements)
 
static void setup (struct m_permutator *mp, uint32_t num_elements)
 
static bool step (struct m_permutator *mp)
 
bool m_permutator_step (struct m_permutator *mp, uint32_t *out_elements, uint32_t num_elements)
 Returns false if there are no new permutation available, the only thing you need to do before calling this function is to make sure that the struct has been zero initialised. More...
 
void m_permutator_reset (struct m_permutator *mp)
 
static void printArray (const uint32_t *array, uint32_t num)
 
void m_do_the_thing (void)
 

Detailed Description

Code to generate permutation of indices.

Author
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m

Function Documentation

◆ m_permutator_step()

bool m_permutator_step ( struct m_permutator mp,
uint32_t *  out_elements,
uint32_t  num_elements 
)

Returns false if there are no new permutation available, the only thing you need to do before calling this function is to make sure that the struct has been zero initialised.