clij-coremem


Лицензия

Лицензия

Simplified BSD License
Категории

Категории

Сеть CLI Взаимодействие с пользователем
Группа

Группа

net.haesleinhuepf
Идентификатор

Идентификатор

clij-coremem
Последняя версия

Последняя версия

2.3.0.4
Дата

Дата

Тип

Тип

jar
Описание

Описание

clij-coremem
clij-coremem
Ссылка на сайт

Ссылка на сайт

https://github.com/clij/clij
Организация-разработчик

Организация-разработчик

MPI CBG
Система контроля версий

Система контроля версий

https://github.com/clij/clij-coremem

Скачать clij-coremem

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/net.haesleinhuepf/clij-coremem/ -->
<dependency>
    <groupId>net.haesleinhuepf</groupId>
    <artifactId>clij-coremem</artifactId>
    <version>2.3.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/net.haesleinhuepf/clij-coremem/
implementation 'net.haesleinhuepf:clij-coremem:2.3.0.4'
// https://jarcasting.com/artifacts/net.haesleinhuepf/clij-coremem/
implementation ("net.haesleinhuepf:clij-coremem:2.3.0.4")
'net.haesleinhuepf:clij-coremem:jar:2.3.0.4'
<dependency org="net.haesleinhuepf" name="clij-coremem" rev="2.3.0.4">
  <artifact name="clij-coremem" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.haesleinhuepf', module='clij-coremem', version='2.3.0.4')
)
libraryDependencies += "net.haesleinhuepf" % "clij-coremem" % "2.3.0.4"
[net.haesleinhuepf/clij-coremem "2.3.0.4"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
com.nativelibs4java : bridj jar 0.7.0
net.java.dev.jna : jna jar 4.5.2
net.java.dev.jna : jna-platform jar 4.5.1

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.13

Модули Проекта

Данный проект не имеет модулей.

Build Status

CoreMem

CoreMem is an library that provided access to off-heap memory, and offers a high-level API for handling such memory. Moreover, Coremem facilitates interoperability with libraries such as BridJ and JNA that provide low-level access to native libraries.

Basic Examples

Allocate an off-heap memory regions of 100 floats:

OffHeapMemory.allocateFloats(100)

Allocate a large page-aligned memory region:

OffHeapMemory.allocatePageAlignedBytes(1000000)

These memory regions get automatically 'freed' once you lose a reference to the object.

You can read and write different primitive types to these memory regions:

memory = OffHeapMemory.allocateFloats(100)
memory.setFloat(1, (byte) 255);        // the offset is in /byte/  units
memory.setFloatAligned(1, (byte) 255); // the offset is in /float/ units

memory.getDouble(1);        // the offset is in /byte/  units
memory.getIntAligned(2);    // the offset is in /int/ units (32 bits)
...

You can also use a 'buffer' API that keeps track of a current read and write index:

ContiguousBuffer buffer = ContiguousBuffer.allocate(124);
buffer.setPosition(100);
buffer.pushPosition();
buffer.writeFloat(1.0f);
buffer.writeFloat(1.0f);
buffer.writeFloat(1.0f);
buffer.writeFloat(1.0f);
buffer.popPosition();
buffer.readFloat();
...

There is also support for non-contiguous /fragmented/ memory regions:

ContiguousMemoryInterface memory = OffHeapMemory.allocateShorts(3 * 5);
FragmentedMemory lSplit = FragmentedMemory.split(lMemory, 3);

Other features

CoreMem also supports:

  • Interoperability with BridJ and JNA pointers as well as NIO buffers.
  • File memory mapping.
  • Recycler pattern: mechanism for reusing ressource-heavy objects like 3D stacks that use off-heap memory).
  • Resource garbage collection API: design your own release-just-before-garbage-collection scheme -- inspired by how it is done in NIO.

Maven Dependency

Artifact:

compile 'net.coremem:coremem:0.4.5'

Add the JCenter repository:

repositories {  
   jcenter()  
}

If you want to know what is the official latest release, check the contents of this file.

How to build project with Gradle

This project uses the gradle wrapper, which means that you don't need to setup gradle on your machine, it comes within this repo.

To build and generate an eclipse project, just do:

./gradlew build cleanEclipse eclipse

Contributors

  • Loic Royer (loic.royer -at- czbiohub -point- org)
  • Robert Haase (robert.haase -at- mpi-cbg.de)
net.haesleinhuepf

clij

GPU-accelerated image processing for everyone

Версии библиотеки

Версия
2.3.0.4
2.3.0.3
2.3.0.0