Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LCMS2 Rust Wrapper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eduardo Trujillo
LCMS2 Rust Wrapper
Commits
8aa3a7f8
Commit
8aa3a7f8
authored
5 years ago
by
Kornel Lesiński
Browse files
Options
Downloads
Patches
Plain Diff
MaybeUninit
parent
683ee517
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ciecam.rs
+7
-7
7 additions, 7 deletions
src/ciecam.rs
with
7 additions
and
7 deletions
src/ciecam.rs
+
7
−
7
View file @
8aa3a7f8
use
super
::
*
;
use
super
::
*
;
use
std
::
ptr
;
use
std
::
ptr
;
use
std
::
mem
;
use
std
::
mem
::
MaybeUninit
;
/// CIE CAM02
/// CIE CAM02
pub
struct
CIECAM02
{
pub
struct
CIECAM02
{
...
@@ -28,18 +28,18 @@ impl CIECAM02 {
...
@@ -28,18 +28,18 @@ impl CIECAM02 {
/// Evaluates the CAM02 model in the forward direction
/// Evaluates the CAM02 model in the forward direction
pub
fn
forward
(
&
mut
self
,
input
:
&
CIEXYZ
)
->
JCh
{
pub
fn
forward
(
&
mut
self
,
input
:
&
CIEXYZ
)
->
JCh
{
unsafe
{
unsafe
{
let
mut
out
=
mem
::
uninit
ialized
();
let
mut
out
=
MaybeUninit
::
uninit
();
ffi
::
cmsCIECAM02Forward
(
self
.handle
,
input
,
&
mut
out
);
ffi
::
cmsCIECAM02Forward
(
self
.handle
,
input
,
out
.as_mut_ptr
()
);
out
out
.assume_init
()
}
}
}
}
/// Evaluates the CAM02 model in the reverse direction
/// Evaluates the CAM02 model in the reverse direction
pub
fn
reverse
(
&
mut
self
,
input
:
&
JCh
)
->
CIEXYZ
{
pub
fn
reverse
(
&
mut
self
,
input
:
&
JCh
)
->
CIEXYZ
{
unsafe
{
unsafe
{
let
mut
out
=
mem
::
uninit
ialized
();
let
mut
out
=
MaybeUninit
::
uninit
();
ffi
::
cmsCIECAM02Reverse
(
self
.handle
,
input
,
&
mut
out
);
ffi
::
cmsCIECAM02Reverse
(
self
.handle
,
input
,
out
.as_mut_ptr
()
);
out
out
.assume_init
()
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment