CellGPU  0.8.0
GPU-accelerated simulations of cells
Public Types | List of all members
access_location Struct Reference

A structure for declaring where we want to access data. More...

#include <gpuarray.h>

Public Types

enum  Enum { host, device }
 An enumeration of possibilities. More...
 

Detailed Description

A structure for declaring where we want to access data.

This file defines two helpful classes for working with data on both th CPU and GPU. GPUArray<T> is a templated array that carries around with it some data, as well as information about where that data was last modified and/or accessed. It can be dynamically resized, but does not have vector methods like push_back.

GPUArray<T> objects are manipulated by ArrayHandle<T> objects. So, if you have declared a GPUArray<int> cellIndex(numberOfCells) somewhere, you can access that data by on the spot creating an ArrayHandle: ArrayHandle<int> h_ci(cellPositions,access_location::host, access_mode::overwrite); The data can then be accessed like for (int c = 0; c < numberOfCells;++c) h_ci.data[c] = .....

Member Enumeration Documentation

◆ Enum

An enumeration of possibilities.

Enumerator
host 

We want to access the data on the CPU.

device 

We want to access the data on the GPU.


The documentation for this struct was generated from the following file: