Skip to content

Vector Fields & Vendor Neutral Copy Headers - #92

Merged
9prady9 merged 16 commits into
arrayfire:develfrom
9prady9:vector_field
Jul 4, 2016
Merged

9prady9 merged 16 commits into
arrayfire:develfrom
9prady9:vector_field

Conversation

@9prady9

@9prady9 9prady9 commented May 26, 2016 •

Copy link
Copy Markdown
Member

Fixes #69
Fixes #70
Fixes #95
Fixes #96

@9prady9 9prady9 added this to the 1.0.0 milestone May 26, 2016
@9prady9

9prady9 commented May 26, 2016

Copy link
Copy Markdown
Member Author

@arrayfire/core-devel
Any questions or feedback is welcome.

Current field example is purely for debugging and testing. I had a quadrupole field in mind for a good example, will do that once the functionality is complete.

vec4 rightTop = pos + trans * vec4( 0.167, -0.333, 0.0, 1.0); // (6)
vec4 rightTip = pos + trans * vec4( 0.333, -0.333, 0.0, 1.0); // (4)

// (2/5)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have my upvote for this.

9prady9 added 6 commits June 21, 2016 19:07
Also includes other fixes and changes given below
* Add chart ticks at end of axes as well
* Remove obsolete transformation related code from all renderables
* Updated 2d vector field example
* Fixed plot axes limits for bubblechart and plotting examples
Orientation of 2d and 3d fields is not per expection due a bug,
working on it now. Other than that, everything else related to fields
seems to be working fine now.
@9prady9 9prady9 changed the title [WIP] Vector Fields Vector Fields Jun 30, 2016
@9prady9 9prady9 changed the title Vector Fields Vector Fields & Vendor Neutral Copy Headers Jul 1, 2016
These copy functions can be used to transfer data compute
backend buffers to OpenGL graphics related buffers.

One of the following macros must be defined to use the helper
functions with a given compute backend.

- USE_FORGE_CPU_COPY_HELPERS for cpu based functionality
- USE_FORGE_CUDA_COPY_HELPERS for cuda-opengl interop
- USE_FORGE_OPENCL_COPY_HELPERS for opencl-opengl interop

For example, to use the header with cpu, cuda backend, you have to
do the following:

```cpp
\#define USE_FORGE_CPU_COPY_HELPERS
\#include <ComputeCopy.h>
```

For opencl backend, couple of additional things need to be defined
apart from above macro definition and header inclusion.

```cpp
cl_context getContext()
{
    // You need to return a valid cl_context object
}
```

```cpp
cl_command_queue getCommandQueue()
{
    // You need to return a valid cl_command_queue object
}
```
@9prady9
9prady9 merged commit 1b9a5a3 into arrayfire:devel Jul 4, 2016
@9prady9
9prady9 deleted the vector_field branch July 4, 2016 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants